Cool/useful short examples of Perl?

Uri Guttman uri at
Mon May 30 22:47:33 BST 2011

>>>>> "DH" == Dave Hodgkinson <davehodg at> writes:

  DH> On 30 May 2011, at 22:17, Uri Guttman wrote:
  DH> No. Real people want to solve real world problems in a simple,
  DH> maintainable way, not wave around a canapé sized penis.
  >> you have a strange way of measuring genitals. real world code is also
  >> concise and fast and usable.


  DH> Not everyone speaks line noise.

if you think that is line noise, then your perl skills need
improving. seriously i have taught the slurp line to total beginners and
they get it afterwards. this is for, not golf.

 my %conf = read_file( $file_name ) =~ /^(\w+)=(.*)$/mg ;

that is an assigment to hash, scalar context call on read_file and a
regex getting out key=val lines. all stuff newbies need to know and must
learn. it happens to use them all in one basic line. it is all a very
teachable thing to anyone who knows what a hash, sub call and regex
are. i don't expect newbies to know how to read that line but i do
expect them to able to learn from it. that is what proper training is
about. not feeding pablum to kiddies.


Uri Guttman  ------  uri at  -------- --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ---- ---------

More information about the mailing list