sub foo { print "hi mom\n"; my $ptr = \&foo; *foo=sub { print "that was unneccessary:"; $ptr->(); }; } foo(); foo();
Hmm, more Perl voodoo. I like it.
In reply to Re^2: Functional Programming & method rewriting
by SpanishInquisition
in thread Functional Programming & method rewriting
by SpanishInquisition
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |