... 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 reply to Re: Re: Re: Re: Re: VarStructor 1.0 by simonm
in thread VarStructor 1.0 by Wassercrats

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.