it appears that when I sort my hashes it is replicating into all my hashes. I am clueless about what I am doing wrong.
It's pretty hard to find out what could be wrong in such lengthy code, without you explaining what do you expect, what the code output that you think incorrect, and a set of data sample. One suggestion is to use Data::Dumper to inspect your data structure. And if you already have spotted a portion of your code that smells, it would help the rest of us to help you if you just posted that portion instead of the full script.

Please don't use the Switch module for production, per its own author's advice. Many people have experienced problems using it. Here are some reasons why. But you can use some simpler alternative. I see, there are only two possible branches so you may acutally only need a boolean test.

my $target_days; if ($data{day_name} =~ /fri/i) { $target_days = \%p_list_fridays; $fridays++; } else { $target_days = \%p_list_weekdays; $weekday++; } $target_days->{$data{doc}}++; # instead of # $target_days->{$data{doc}} = $target_days->{$data{doc}}+1;
I'm sure this can be improved, but it's just a quick answer.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!


In reply to Re: trouble shooting my priority lists by naikonta
in thread trouble shooting my priority lists by arcnon

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.