in reply to Re: how can I speed up this perl??
in thread how can I speed up this perl??

so how do I access the frequency of each pair using your code?

Replies are listed 'Best First'.
Re: Re: Re: how can I speed up this perl??
by moxliukas (Curate) on Nov 24, 2003 at 11:41 UTC

    You access the data by supplying the hash key. so print $counts{tt}; would print the frequency of tt occurences.

      thanks for your patience moxliukas, but this is what i have been doing, and I dont get a total count, I get a list of presence / absence numbers instead e.g. 00000000000100000000000000010000000000000000001000000000001
        Could you post the code, then, because this ought to be working. A couple quick things to check: you are ++'ing the value (not just setting it to 1 or something).

        ------------
        :Wq
        Not an editor command: Wq
Re: how can I speed up this perl??
by Abigail-II (Bishop) on Nov 24, 2003 at 11:37 UTC
    Do you know what a hash is?

    Abigail

      yes! bur I tried this: and i just get a list of 1's: 11111111111111 I dont get the actual count
      $tt = $freq{tt}; print " tt $tt\n";
        Without seeing the code, it's hard to say what's wrong.

        Abigail