It seems to work if you undefine *foo instead of undefining $x. If you want to undefine something, you have to undefine it (and not undefine something else).
print "Undefining foo()"; undef *foo; print "Foo is not defined" unless defined &foo;
In reply to Re: undefing *foo{CODE} does not fully work
by brian_d_foy
in thread undefing *foo{CODE} does not fully work
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |