in reply to undef Package;

Perhaps you look for something like reset

 "package::"

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print

Replies are listed 'Best First'.
Re: Re: undef Package;
by Juerd (Abbot) on Apr 03, 2002 at 11:59 UTC

    Perhaps you look for something like reset

    reset deletes symbols starting with a specific letter. tr-like ranges can be used.

    reset $foo is similar (but not at all equal) to

    for (grep /^[$foo]/, keys %::) { undef @$_; undef %$_; undef $$_; }
    I want subs to be destroyed as well.

    U28geW91IGNhbiBhbGwgcm90MTMgY
    W5kIHBhY2soKS4gQnV0IGRvIHlvdS
    ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
    geW91IHNlZSBpdD8gIC0tIEp1ZXJk