Here's (the beginning of) your problem:

foreach my $probeset_id (sort keys %{$row{$origin{$pip}}}){

In the above, you're saying "return the value for key $pip from hash %origin; use that value as a key in hash %row" and so on. Notice the "%origin" in this description? You don't have one. Instead, you have a scalar called $origin - and what you actually mean is

foreach my $probeset_id (sort keys %{$row{$origin}{$pip}}){

...and so on. The other error you have - a minor one, in comparison to the above - is that you've dug down one level too deep in your last 'foreach' statement:

foreach my $probeseq ( sort keys %{$row{$origin}{$pip}{$probeset_id}{$ +affyscore}{$gc}}){

If you look back to where you construct that hash, you'll notice that $row{$origin}{$pip}{$probeset_id}{$affyscore}{$gc}} is actually a scalar - not a hash. Trying to extract keys from it, as you do in the above statement, is not likely to be productive. Simply print the value of this variable.

Last of all - this isn't a mistake, but it is likely to lead to one (a mistype):

@data=split (/\t/,$_); my $probeset_id = $data[0]; my $origin = $data[1]; my $probeseq = $data[2]; my $pip = $data[3]; my $gc = $data[4]; my $affyscore = $data[5];

This is unnecessary. Better to use a hash slice:

my ($probeset_id, $origin, $probeseq, $pip, $gc, $affyscore) = split / +\t/;

-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells

In reply to Re: Complex Data Structure by oko1
in thread Complex Data Structure by sesemin

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.