Personally, I think it is far from beautiful, it is also far from obvious what you are trying to do, try this:
if($this_is_not_right) { @_ = (error_code => 123, error_msg => 'this is error'); goto &somewhere; } do_something(); return; sub somewhere { my(%params) = @_; show_error_page($params{error_code},$params{error_msg}); }
| We're not surrounded, we're in a target-rich environment! |
|---|
In reply to Re: goto with some arguments
by jasonk
in thread goto with some arguments
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |