On 24/06/2013 07:36, lee wrote:

It would be like:

if ( $color eq "blue" ) {
   print "test\n";
   last;
}

Alternative:

  print( "test\n" ), last
    if $color eq "blue";


I also see:

  print( "test\n" ) and last
    if $color eq "blue";

but always question that, because: what if print() fails?
(even if it can't fail, it is hard to read such ambiguous code, every time again)

--
Ruud


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to