![]() |
|
Problems? Is your data what you think it is? | |
PerlMonks |
Re: eval and return valuesby JavaFan (Canon) |
on Jan 14, 2009 at 13:22 UTC ( #736227=note: print w/replies, xml ) | Need Help?? |
I'd write that as:
First, I don't 'my' $foo inside the block. Second, an eval may fail, yet leave $@ false (because of 'end of scope' effects). So you should make sure that on success, the eval returns a defined value, and check the return value of the eval.
In Section
Seekers of Perl Wisdom
|
|