in reply to Re: Need an $a and $b as in perl's sort routine
in thread Need an $a and $b as in perl's sort routine
But then the code is not usable from a module, no?
I have used things like the following in the past:
sub exec_callback { my $code = shift; my $caller = caller; no strict 'refs'; no warnings 'once'; local(*{$caller."::a"}) = \my $a; local(*{$caller."::b"}) = \my $b; $a = {}; $b = 1; $code->(); }
Good Day,
Dean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need an $a and $b as in perl's sort routine
by demerphq (Chancellor) on Jan 11, 2006 at 16:12 UTC |