There's more than one way to do things | |
PerlMonks |
Re: return from evalby MarkM (Curate) |
on Jan 22, 2003 at 22:42 UTC ( [id://229150]=note: print w/replies, xml ) | Need Help?? |
If you are using eval{} as a try, it is not a long stretch to consider using "if ($@ =~ /^RETURN/) {" as a catch, and return from there. Use of eval{} as 'try' is more of a convenience than a specifically designed language construct. Perl never claimed to support 'try' in Perl 5.x.
In Section
Meditations
|
|