Thanks again Kenosis and thanks to everyone who replied. I was able to fix my program finally. I made a lot of modifications from my original program. Using the CSV module was a much better strategy for getting out the total number of sample_ids. I did find it very helpful to go back and check that all my arrays and hashes were storing what they in fact were storing.Thanks again for all your suggestion

I made a hash table with the sample_Id as keys and the line of text from the Merged_File with the sample id as a value. I used dumpvalue to display my hash contents and used a hash slice to print out the specific values I needed. Thanks to everyone dave

use Dumpvalue; %id_lookup_table = map { ($Merged_Ids[$_], $merged_array[$_]) } 0..$#M +erged_Ids; my $dumper = Dumpvalue -> new; $dumper -> dumpValue(\%id_lookup_table); open(ERRORREPORT,"+<","reported_list.csv") or die "reported_li +st.csv: $!"; print ERRORREPORT @id_lookup_table{(@sample_ids)}; close ERRORREPORT; 'UCD12-00242-P' => "\"Joe Schmie\",ABD032,12-Feb-12,23-Feb-12,\"Whale +Tail Island, Fictitious Place\",USA,California,etc

In reply to Re^6: Why is the following instance of Matching using an array element not working by MyJeweledPerls
in thread Why is the following instance of Matching using an array element not working by MyJeweledPerls

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.