Is it possible to assign an entire 1-D array to a row in a 2-D array without looping and without using references?

If you're new to references, and that is why you are wanting to not use them, I strongly suggest you sit down and get your head wrapped around them. You will not be able to implement complex data structures without them. And life will be much easier with them anyway.

If you don't understand references, I hope you don't feel dumb. Because it took me a long time for the concepts to settle in my brain. But one day I was talking with someone about it and it just clicked. From then on, it's been smooth sailing. Whatever time it takes you to understand references will be time well spent. In the long run you will benefit immensely.

And to answer your question, in many instances, you can't achieve what you're wanting anyway (the multi-dimentional part) without using references. To assign an array as an array element requires references - there is no other way.

Good luck & don't give up.


In reply to Re: Assigning an Array to a Multidimensional Array by drewbie
in thread Assigning an Array to a Multidimensional Array by keithbas

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.