hello!

thanks for all the replies! :D

To Almut:

Actually, judging from what almut said...It may be kind of impossible to generate a script that is able to differentiate which columns have frequencies of 0...

Because the input file is actually like that:

L122Q 40 97.56097561 V100I 15 36.58536585 T373I 10 24.3902439 V217I 4 9.756097561 G16D 3 7.317073171 L283P 3 7.317073171 D21N 2 4.87804878 S450N 2 4.87804878 D53E 2 4.87804878 I109V 2 4.87804878 R236K 2 4.87804878 K351R 2 4.87804878 K470R 2 4.87804878 K400R 2 4.87804878 I61L 2 4.87804878 V425I 2 4.87804878 N309T 2 4.87804878 M105V 2 4.87804878 K452R 2 4.87804878 E372D 2 4.87804878 L456V 2 4.87804878 M191L 2 4.87804878 A190V 2 4.87804878 V444I 2 4.87804878 V313Y 2 4.87804878 T373A 2 4.87804878 M316I 2 4.87804878 S498N 2 4.87804878 R293K 2 4.87804878 N433T 2 4.87804878
(this is only 1 little portion)

The system won't really know where each month start or ends right? ): So it also won't know when the frequency for each is 0... ...How about if I use separate files instead? Maybe 1 file for each month? Would it be possible to achieve my goal this way?

Sorry for the pestering and I really appreciate you pointing out the fatal error in my question! :))

To Spazm:

1. I have given a sample of the data file already, thanks for taking the effort to really help me look at my script...although what I'm asking for is a bit illogical ):

2. $freq represents the middle number in my data file...I'm still a newbie at this, so I may actually have a lot of extra steps that do not contribute to anything, but I don't really know how to make them more concise

3. When the occurrence rate is zero, it just doesn't appear in the data file...

4. My grep is to get values larger than 10, because I'm only looking at keys which have an occurrence rate of above 10 for any months

5. Thanks a lot for this helpful input! :D I was wondering why the sort function no longer worked after I changed it into an array. This is really useful! :)

Many thanks for helping me look at my script, I hope it'll start working too! :))

Best Regards,

Buzzybee


In reply to Re^2: Put multiple values as columns inside a hash by buzzybeewhee
in thread Put multiple values as columns inside a hash by buzzybeewhee

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.