in reply to Re^2: goto &sub and local question
in thread goto &sub and local question
the only possibility to pass additional information accross the goto &... boundary is by using global (non-localized) variables.
Depending on the use case you might be able to pass the data via @_:
sub s1 { my $data = pop; print Dumper $data; } sub s0 { push @_, [45, 'D']; goto &s1; } s0;
The details of how to do it without interfering with any existing arguments largely depend on the specific use case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: goto &sub and local question
by rovf (Priest) on Nov 24, 2008 at 12:37 UTC |