SPUG: undef a list of variables?

jimfl jimfl at colltech.com
Tue Aug 24 16:32:36 CDT 1999


--On Tue, Aug 24, 1999 12:19 PM -0700 Michael Leary <leary at nwlink.com>
wrote:

     > Anyone know a nifty way to undef a list of variables?  I'm trying to
     > keep my package namespace clean between method calls.

Something like:

    @clean = (\$foo, \$bar, \$baz, \$ghoti);
    map {undef $$_} @clean;

--
Jim Flanagan         Collective Technologies
jimfl at colltech.com   http://www.colltech.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    POST TO: spug-list at pm.org        PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 SUBSCRIBE/UNSUBSCRIBE: Replace ACTION below by subscribe or unsubscribe
        Email to majordomo at pm.org: ACTION spug-list your_address





More information about the spug-list mailing list