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"; }