It took me a while but I tracked down the cause of your ugly symbol (FS or ^\) I dont think to many people use this one but from perldoc perlvar:

_______________________________________________________
$SUBSCRIPT_SEPARATOR
$SUBSEP
$;

The subscript separator for multidimensional array emulation. If you refer to a hash element as
$foo{$a,$b,$c}
it really means
$foo{join($;, $a, $b, $c)}
But don't put
@foo{$a,$b,$c}      # a slice--note the @
which means
($foo{$a},$foo{$b},$foo{$c})
Default is ``\034'', the same as SUBSEP in awk. If your keys contain binary data there might not be any safe value for $;. (Mnemonic: comma (the syntactic subscript separator) is a semi-semicolon. Yeah, I know, it's pretty lame, but $, is already taken for something more important.)

Consider using ``real'' multidimensional arrays as described in the perllol manpage.
_______________________________________________________

So you could set $; to something that isnt so 'ugly' or more intelligently use a two level hash, often called a HOH like so:

use Data::Dumper; my (%Sales,%Years); #.... ++$Sales{$sale_name}->{$fy}; # fy = Fiscal Year # and/or ++$Years{$fy}->{$sale_name}; # fy = Fiscal Year #.... print Dumper(\%Sales,\%Years); # _very_ usefull tool. # Less useful, but more obvious than messing with $; ++$count->{"$sale_name : $fy"}; # fy = Fiscal Year
Reversing the relationship or using both can also be useful. Of course putting them together into titles involves an extra loop but ultimately I'd say this is the way to go.

HTH

Yves / DeMerphq
--
Have you registered your Name Space?


In reply to Re: Relationships between hash Data by demerphq
in thread Relationships between hash Data by data67

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.