in reply to Local Subroutines
That said, you can do something like:
sub foo { my ($start, $num) = @_; my $_foo; *_foo = sub { # Do stuff here }; my @return = $_foo->($start, $num); return @return; }
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Local Subroutines
by Roy Johnson (Monsignor) on May 27, 2004 at 19:22 UTC | |
by PodMaster (Abbot) on May 28, 2004 at 06:18 UTC | |
|
Re: Re: Local Subroutines
by sweetblood (Prior) on May 27, 2004 at 19:31 UTC |