saintmike has asked for the wisdom of the Perl Monks concerning the following question:
I could possibly wrap it up insub myprint { print "MYPRINT: ", @_; } my $printfunc; # Works $printfunc = \&main::myprint; $printfunc->("hello\n"); # Doesn't work $printfunc = \&CORE::print; $printfunc->("hello\n");
but I'm a stickler and would like get a more elegant solution :). Any ideas?sub coreprint { print @_; }; $printfunc = \&coreprint;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reference to functions in CORE:: pseudo package?
by blokhead (Monsignor) on Feb 01, 2004 at 19:38 UTC | |
|
Re: Reference to functions in CORE:: pseudo package?
by Zaxo (Archbishop) on Feb 01, 2004 at 23:14 UTC | |
by ysth (Canon) on Feb 02, 2004 at 02:41 UTC |