in reply to Clearing user defined variables
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.
|
|---|