in reply to Re^4: How to de-reference a coderef?
in thread How to de-reference a coderef?
Pretty simple to do.my $sub = Sub { my $x = shift; print $x }; $sub->("foo"); # prints foo print "that was from $sub\n";
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: How to de-reference a coderef?
by Anonymous Monk on Dec 09, 2004 at 20:50 UTC | |
by merlyn (Sage) on Dec 10, 2004 at 00:06 UTC |