I would like to thank everyone for their help
I currently have:
foreach(@info){ $_=~ s/^\s+//; @str = split; if( $myhash{$str[2]}{$str[0]} ){ # if same connection type al +ready stored ( $myhash{$str[2]}{$str[0]}[0] ) += $str[0]; ( $myhash{$str[2]}{$str[0]}[1] ) += $str[4]; ( $myhash{$str[2]}{$str[0]}[2] ) += $str[5]; ( $myhash{$str[2]}{$str[0]}[3] ) += $str[6]; ( $myhash{$str[2]}{$str[0]}[4] ) += $str[7]; ( $myhash{$str[2]}{$str[0]}[5] ) += $str[8]; ( $myhash{$str[2]}{$str[0]}[6] ) += $str[9]; ( $myhash{$str[2]}{$str[0]}[7] ) += $str[12]; ( $myhash{$str[2]}{$str[0]}[8] ) += $str[13]; ( $myhash{$str[2]}{$str[0]}[9] ) += $str[16]; } else{# if connection type is not stored push(@temp, $str[0], $str[4], $str[5], $str[6], $str[7], +$str[8], $str[9], $str[12], $str[13], $str[16]); $myhash{$str[2]}{$str[0]} = [@temp]; #enter new data } }

My next step will be determining how to print, I was using the code below but I will change that
foreach my $element(sort keys %myhash){ printf OUT ("%-20s", $element); foreach (@{$myhash{$element}}){ printf OUT ("%8s", $_); } print OUT "\n"; }#foreach
thanks everyone

In reply to Re: Re: multidimensional hash of array by kevyt
in thread multidimensional hash of array by kevyt

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.