I know strict and warnings are returing things...but I don't know what they mean, google only helps so much.

So in other words, you see these three messages and you don't know what they mean?

Global symbol "$refToArrA" requires explicit package name at /tmp/junk +.pl line 53. Global symbol "$refToArrB" requires explicit package name at /tmp/junk +.pl line 54. Global symbol "$refToArrC" requires explicit package name at /tmp/junk +.pl line 55.
You can figure out that lines 53, 54 and 55 are the first three lines after "sub gener". Now, you do have to read a bit about what "my" does in perl, so that you can figure out that in your main "for" loop (over "1 .. $popCt"), the three variables declared there with "my (...)" are not visible (are inaccessible, do not exist) outside the scope of the for loop. Those variables need to be passed to the "gener()" sub as parameters, so that the sub will have access to them, because the "gener" sub is defined outside the scope of the for loop. So do it like this:
for ( 1 .. $popCt ) { my ( $refToArrA, $refToArrB, $refToArrC ) = makeArrays(); &gener( $refToArrA, $refToArrB, $refToArrC ); } # ... sub gener { my ( $refToArrA, $refToArrB, $refToArrC ) = @_; ... }
That will get rid of the syntax errors (which were imposed because you have "use strict;" at the top). I don't know whether the script does exactly what you want, but it does run, and produces output in a coherent way.

In reply to Re^5: Hash of Hash Redux by graff
in thread Hash of Hash Redux by BioNrd

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.