in reply to check if all certain chars are found in a sentence

You can build a regex that does the job:
my $map = 'abc'; my $re = '^' . join '', map "(?=.*?$_)", map quotemeta, split m//, $ma +p; if ('text without all three chars' =~ m/$re/) { print "Failure"; }

While you might call it elegant, it's probably not the most efficient way for long strings.

Replies are listed 'Best First'.
Re^2: check if all certain chars are found in a sentence
by ikegami (Patriarch) on Aug 27, 2008 at 17:56 UTC
    On the other hand, it's quite efficient if you check multiple sentences for the same letters.