Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

That's not the standard way, it's one of the standard mistakes.

Decades of advances in computer science have gotten us to a point where dangerous practices such as "variable names for variables" (symbolic references) are usually superceeded by better, safer, saner alternatives. It's irresponsible to misrepresent symbolic references as the "standard way" to do something that really ought to be done with an array, a hash, or first class references.

Just because Perl makes it possible to write fragile, bug prone, unsafe code doesn't mean doing so is necessarily the standard for Perl. To the contrary, living up to the standards of Perlish best practices dictates that the use of symbolic references is to be avoided in production code. Forget they exist, and you'll be in much better shape. Leave their use to the people who wrote Exporter, and other gluttons for punishment.

I certanly hope the OP has the sense to listen to the voices of reason here, avoiding the use of symbolic references in favor of better strategies. I hope that your advice will be ignored, despite its apparent simplicity. That simplicity is dangerously seductive. The reality is that what appears simple at the outset can lead to hellish difficulty down the road.


Dave


In reply to Re^2: looping through variables by davido
in thread looping through variables by keiusui

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (5)
    As of 2014-12-20 05:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (95 votes), past polls