in reply to Re: strange behaviour in perl ..please explain
in thread strange behaviour in perl ..please explain
exit evaluates given expression, your print statement in this case and exits.
No. exit is evaluated with no arguments in all of the OP's snippets.
print"yes",exit ,print"no" if ($var)
is the same as
print( "yes", exit(), print("no") ) if ($var)
That's because
print( "yes", exit( , print("no") ) ) if ($var)
is illegal.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: strange behaviour in perl ..please explain
by puudeli (Pilgrim) on Jan 23, 2009 at 18:50 UTC |