in reply to searching problem
#!/usr/bin/perl use warnings; use strict; my @words = qw(mamy dady bal foo bar ymamaa arabic); my $regex = join '|', map scalar reverse, @words; $regex = qr/$regex/; print "$_\n" for grep /$regex/, @words;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: searching problem
by BillKSmith (Monsignor) on Jan 18, 2013 at 13:45 UTC | |
|
Re^2: searching problem
by Lotus1 (Vicar) on Jan 18, 2013 at 22:57 UTC |