in reply to Verify string contains ALL words in list
use Quantum::Superpositions; use strict; my @word; push @word, qr/\bfee\b/; push @word, qr/\bfi\b/; push @word, qr/\bfo\b/; push @word, qr/\bfum\b/; my $str = 'tweedle fee hi fi mo fo drunk on some fum'; if ($str =~ all(@word)) { warn "$str contains all of @word"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Quantum::Superpositions did not overload =~
by merlyn (Sage) on Oct 20, 2000 at 19:09 UTC | |
by princepawn (Parson) on Oct 20, 2000 at 19:26 UTC |