in reply to Check if a word is included in another
$ perl -le' my $target = "PEARLYGATES"; my $word = "EASYPEASY"; ( my $temp = $target ) =~ s/[^$word]//g; print join( "", sort split //, $temp ) eq join( "", sort split //, $wo +rd ) ? "Match" : "No match"; ' No match
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Check if a word is included in another
by almut (Canon) on Apr 18, 2010 at 17:08 UTC | |
|
Re^2: Check if a word is included in another
by PeterPeiGuo (Hermit) on Apr 18, 2010 at 18:06 UTC | |
by b4swine (Pilgrim) on Apr 18, 2010 at 22:20 UTC | |
by PeterPeiGuo (Hermit) on Apr 18, 2010 at 23:07 UTC | |
by b4swine (Pilgrim) on Apr 18, 2010 at 23:18 UTC |