I don't want to use symbolic referencing,

and

I just want to create a number of arrays depending on the number of times I run through a loop

are contradictory statements. What you are asking to do is symbolic referencing. That's what you call it when you use one variable in the name of another. Other have given you good pointers to why you shouldn't do that, but if you really insist in ignoring their advice you should read perlref, particularly the section on symbolic references. Should you decide to take all the good advice that you've been given and implement this using arrays of arrays, then you might find it interesting to read, perlreftut, perllol and perldsc.

Also note that use strict explicitly bars the use of symbolic references. I assume that you're being careful and have use strict in your script. In order to use symbolic references, you'll need to put no strict 'refs' around the piece of code where you're "bending" the rules.

Blessed Be
The Pixel


In reply to Re: Re: Re: Varying Variable Names by pixel
in thread Varying Variable Names by willick

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.