Yes. Here is one way:
... close CHILD; sub bar { my $bar = shift; print "modified foo($bar)\n"; } *foo = *bar; foo('child'); ...
Output:
12:39 >perl 844_SoPW.pl original foo(parent) modified foo(child) original foo(the end) 12:39 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Redefining function after fork
by Athanasius
in thread Redefining function after fork
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |