http://www.perlmonks.org?node_id=1014024


in reply to searching problem

You can create a regex that matches any of the reversed words:
#!/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;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ