in reply to Weird syntax question
Which evalutates ($x or print 0) first. That will always return true so the 1 gets printed in either case.perl -e '$x=1;print 1 if ($x or print 0)'
With the subs, it will evaluate to false since you're returning 0.
Rich
|
---|