Fwd: Re: Perl Cookbook

2013-06-17 Thread David Christensen
Someone wrote: > I have the 2nd edition. Make sure you "reply to list" so that everyone can help and/or benefit. Okay. What about the other two suggestions? 2. Have you checked the errata on the publisher's web site? Here are the errata for the current (2nd) edition: http://oreilly.com/c

Richard Fernandez

2013-06-17 Thread Richard Fernandez
wer http://estetikburuncerrahisi.com/mr/lybibl/cddhmsewykrj/ubpejcbsumykym.php Richard Fernandez

Re: last

2013-06-17 Thread malisetti rammurthy
Bill, Below statement wont be helpful for lee, as he has requirement to loop at least one time. last if ($counter > 2); where as below one is working: if ( $counter > 2) { print 'if : ' . $counter . "\n"; #could do print "if : $counter\n" as well last; } On

Re: last

2013-06-17 Thread bill pemberton
I think the rest after the 'if' for the last is wrong. either do this: last if ($counter > 2); or if ( $counter > 2) { print 'if : ' . $counter . "\n"; #could do print "if : $counter\n" as well last; } On Mon, Jun 17, 2013 at 8:56 AM, lee wrote: > Hi, > > trying to figure out what

Re: last

2013-06-17 Thread James Alton
lee, You have a post statement if and then a code block. You can only use one of two forms: print "test" if $color eq "blue"; #no parenthesis required if($color eq "blue"){print "test";} As far as last, http://perldoc.perl.org/functions/last.html The example given: LINE: while () {

last

2013-06-17 Thread lee
Hi, trying to figure out what `last' actually does, I wrote this test script: use strict; use warnings; use autodie; my $counter = 0; while($counter < 8) { last if($counter > 2) { print "if: " . $counter . "\n"; } else { print "else: " . $counter . "\n"; } $