rsiedl has asked for the wisdom of the Perl Monks concerning the following question:
I now know that this will match $term1 to $myTerms[0]my @myTerms = ( 'blah foo', 'bar' ); my $term1 = "blah"; my $term2 = "blah foobar";
but i would like to know the item in the array that matches $term2 and then use that item in place of $term2.( grep /\Q$term\E/, @myTerms)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "reverse" array match
by Roy Johnson (Monsignor) on May 27, 2004 at 14:45 UTC | |
by rsiedl (Friar) on May 27, 2004 at 14:48 UTC | |
|
Re: "reverse" array match
by Happy-the-monk (Canon) on May 27, 2004 at 14:45 UTC |