in reply to Re^2: "next" from within eval {} ?
in thread "next" from within eval {} ?
Fair enough. T'was nought but a thought :)
Funnily enough, I don't get the warning on 5.10.
#! perl -slw use strict; sub do_foo { $_ != 3 or die "foo == 3" } sub do_bar { $_ != 4 or die "bar == 4" } for (1..5) { eval { next unless do_foo(); next unless do_bar(); #... 1; } or do { warn $@; next; }; print; } __END__ c:\test>junk47 1 2 foo == 3 at C:\test\junk47.pl line 4. bar == 4 at C:\test\junk47.pl line 5. 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: "next" from within eval {} ?
by Anonymous Monk on Dec 15, 2011 at 17:32 UTC | |
by BrowserUk (Patriarch) on Dec 15, 2011 at 17:49 UTC |