in reply to A better way to make the script run faster?
Why do you have the strings in arrays and not in hashes?
I'd put the array you search in into a hash where the array elements would be the keys and the value would be the number of occurences.
Finding then the number of occurences for each of your searched keys is simply getting the value from the hash.
foreach my $g (@gl) { print "$g occures ",($hfr_genes{$g} || 0)," time(s)\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A better way to make the script run faster?
by Anonymous Monk on Jul 31, 2013 at 13:59 UTC | |
by Skeeve (Parson) on Aug 01, 2013 at 06:34 UTC |