sub baz { my $data = "something"; # Doesn't have to be a string die($data); } sub bar { baz(); } sub foo { bar(); } #main if (!eval { foo(); 1 }) { print("Got data from deep function: $@"); }
In reply to Re: Is there a way to unwind the call stack and return a value?
by ikegami
in thread Is there a way to unwind the call stack and return a value?
by erabus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |