in reply to Guidance needed in perl program for fast pattern matching algorithm.
A more "perlish" way of doing that sort of thing is:for(my $i=$m;$i<scalar @a;$i++)
And this:for my $i ($m..$#a)
Is easier done like this (and they will be in the correct corresponding order):while (($key1, $val1) = each(%num)) { push(@key,$key1); push(@val,$val1); } }
my @key = keys %num; my @val = values %num;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
something similar to horsepool algorithm or raita algorithm
by tweety (Initiate) on Oct 10, 2006 at 18:33 UTC |