Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Re: Re: Re: VarStructor 1.0by simonm (Vicar) |
on May 04, 2004 at 18:45 UTC ( [id://350483]=note: print w/replies, xml ) | Need Help?? |
... the fact remains that not all variables in some good scripts are "my" variables, and sometimes those all need to be reset. I believe I have such a script...
I believe the sense of the monastery is that there are better ways to address the need to "reset" variables. If you would post your script (in a new thread), I'm sure people would fall over themselves to come up with other ways of tackling this issue. The reason this has kicked up such a furor is that other monks are trying to communicate a lesson to you that they have learned through personal experience: that adjusting one's approach so that it takes advantage of mainstream features (my, local, references and the like) leads to more reliable solutions than if they relied on a piece of Perl code to parse other Perl code. If your other script really demonstrates the need for the variable-clearing technique you've posted, you could force those monks to eat their words. On the other hand, if the monks show you a simpler way to avoid this whole problem, you will have both learned something new and saved yourself from the significant effort involved in making your Perl parser more sophisticated.
In Section
Code Catacombs
|
|