in reply to Guidance needed in perl program for fast pattern matching algorithm.

Just a few comments (since I don't really know what algorithm you are trying to implement). First consider using using strict and warnings. And next, on this line:
for(my $i=$m;$i<scalar @a;$i++)
A more "perlish" way of doing that sort of thing is:
for my $i ($m..$#a)
And this:
while (($key1, $val1) = each(%num)) { push(@key,$key1); push(@val,$val1); } }
Is easier done like this (and they will be in the correct corresponding order):
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
    am try to implement something very close to or something similar to horsepool algorithm or raita algorithm.