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
In reply to Re: Weird syntax question
by rchiav
in thread Weird syntax question
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |