That works like a charm. Thanks very much for the help!

I have another thing...of course...the life of a noobie

I want to now make @ind, @chroma @chromb interactive for each population

I call the sub with
for my $poper (1 .. $popCt) { input(); gener(@chroma, @chromb, @ind); }
Here is the sub...
sub input { my ($upper, $lower); my $center = 1; print 'Enter lower bound: '; chomp ($lower = <STDIN>); print 'Enter upper bound: '; chomp ($upper = <STDIN>); my $ranpop; while ($center--) { $ranpop = int rand($upper - $lower + 1) + $lower; print $ranpop . "\n"; my @ind = (1...$ranpop); my $limiter = 50; while ($ranpop) { my $genea = int rand ($limiter); push(my @chroma, $genea); my $geneb = int rand ($limiter); push(my @chromb, $geneb); $ranpop--; } return @chroma, @chromb, @ind; } }
Again this should work, but I am lost again. The @chroma, @chromb, @ind will then go into the hash maker that you all got working for me

Also you all can yell at me all you want about use strict...no perl books have told me how to do that! I am flying without a net! Any good references?


In reply to Re^2: Hash of Hash Redux by BioNrd
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.