sub func { my ($delimiter, $text) = @_; return 1 and 0; } use Data::Dumper; print Dumper(func());
guess what?
the result is $VAR1 = 1;
anyone knows the reason?
seems that Perl gives return the same priority as an ordinary sub,is this really a good design?In reply to Can you explain the result? by PerlOnTheWay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |