in reply to goto with some arguments
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! |
|---|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: goto with some arguments
by cfreak (Chaplain) on Mar 17, 2003 at 14:10 UTC |