good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Bad return value from a block with variable localizationby jesuashok (Curate) |
on Apr 10, 2006 at 08:09 UTC ( [id://542227]=perlquestion: print w/replies, xml ) | Need Help?? |
jesuashok has asked for the wisdom of the Perl Monks concerning the following question:
Hello all,
I've run into this strange behaviour when playing with trying to make functions return different values from the number of parameters they were called with. If you test @_, and that you return from a do { ... } block where a variable is localized, the return value is undef if you don't add an else statement.
"Keep pouring your ideas"
2006-10-07 Unapproved by planetscape once evidence of habitual plagiarism uncovered.
Back to
Seekers of Perl Wisdom
|
|