The point everyone's trying to make to you is that you really don't want to do what you're asking how to do. It's the wrong strategy to solve your problem. You have not come up with a new "good reason" to use symbolic references. The fact is that there is a better way. I know it may be hard to believe. You're asking yourself, "Why don't they just tell me how to do it?" The fact is it's pretty easy to do what you're asking. But think of it this way: If you hang by your fingertips from a wire suspended between two skyscrapers, it's pretty easy to work your way out there onto the wire, but it's also pretty easy to lose your grip and plunge to your death. Do you really want to hang by your fingertips hundreds of feet above the hard pavement? ...I didn't think so.

Now, what you do want is real references. You can read about them in perlreftut (a tutorial on using references), perlref (full documentation on references), perldsc (Perl datastructure cookbook), and perllol (Perl lists of lists reference).

The good news is that real references will solve your problem a slightly different way, and will solve the problem while you're feet are still firmly planted on the ground, instead of dangling a thousand feet up from a high wire.


Dave


In reply to Re: Changing name of ARRAY in each iteration by davido
in thread Changing name of ARRAY in each iteration by cool

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.