Just as I finished my reply to your post, that same notion -- slightly differently formatted -- struck me too:
for (1..5) { eval{ do_foo() && do_bar() } and print or warn $@; }
And when I came to post that, I saw your update. T'is much cleaner.
In reply to Re^3: "next" from within eval {} ?
by BrowserUk
in thread "next" from within eval {} ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |