Well... yes. I admit it.

From the original question I had made an obviously irrational assumption. I had assumed that the application was reading lines (presumably from a file), splitting those into columns (@column = split /\s+/, $line ;) and storing the result in a two-dimensional array of cells (@sheets). That assumption lead me astray, and I slipped into the unwise contemplation of what I now acknowledge to be a heresy.

I freely confess my sins and repent.

I accept, without reservation, that on occasion it may be desirable to have one (or more) rows in a two-dimensional array which are accessible by an alias, say, @columns. And I would like now to apologize, humbly and deeply, if my remarks suggested otherwise, in any way, whatsoever.

I feel foolish now, and would like uncountably many other offences of hubris to be taken into consideration.

In mitigation, however, I would like to draw attention to the very first words of my remarks: "As a general proposition".

And I suggest that, in general, $sheets[1] = \@column; won't be a deliberate exercise in aliasing, but will be a potential hazard, which could bite the innocent programmer in their unsuspecting gluteus maximus (or glutinous maximus, in some cases).

I now undertake to collect my hair shirt from the cleaners at the earliest opportunity, and wear it more often to remind me to transgress no more.


In reply to Re^4: One Dimensional Array into Two by gone2015
in thread One Dimensional Array into Two by JoeJaz

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.