Am I the only one who thinks it's dumb for there to be no built-in way to clear only user defined variables, to avoid the problem with the reset function clearing stuff like @INC?I don't think it's dumb, and I'm pretty sure there is a "built-in" way to do it.
Is there a better way?If I were you I'd rewrite the script. In the very least just stick it in a __PACKAGE__ other than main, that way when you reset, @INC and family won't be affected.
Would this be suitable for the Snippets section?I'd say it qualifies as a snippet. A better solution would be to use B::Xref.
In reply to Re: Clearing user defined variables
by PodMaster
in thread Clearing user defined variables
by Wassercrats
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |