Dr.Ruud wrote:
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,

Yes it CAN fail!  For example:

select FH;

...

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

And somewhere between the select and the print the device that FH points to becomes unavailable or full.


it is hard to read such ambiguous code, every
time again)


John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction.                   -- Albert Einstein

--
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