in reply to Coding problem
I am not sure that it's useful to perform the intermediate step of substitution. This ought to work:
my @searchWords = split(/\s+/, $Input{'query'}); foreach my $active(@active){ my $newd = lc($active); foreach my $searchWord(@searchWords){ $searchWord = lc($searchWord); push(@found, "$active: matches '$searchWord'") if grep { /$se +archWord/ } $newd; } } __END__ prints "active: matches searchWord"
update Because this is not supposed to be doing anything different than your sample, I suspect that your sub is not really returning an array: my guess.
mkmcconn
|
---|
In Section
Seekers of Perl Wisdom