vinoth.ree has asked for the wisdom of the Perl Monks concerning the following question:
sub Create_fun { my ($var) = @_; sub { print "$var";} } $anony_sub_ref = Create_fun("first_function");
In the above code the function Create_fun() return the reference to anonymous function and the $anony_sub_ref holds it I need to give name to this anonymous function How can I do it ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Giving name to anonymous function
by moritz (Cardinal) on Apr 22, 2009 at 08:58 UTC | |
by tilly (Archbishop) on Apr 22, 2009 at 14:45 UTC | |
|
Re: Giving name to anonymous function
by Anonymous Monk on Apr 22, 2009 at 10:14 UTC | |
by Anonymous Monk on Apr 22, 2009 at 11:15 UTC | |
by holli (Abbot) on Apr 22, 2009 at 10:22 UTC |