Nice, but instead of compiling {number of collections} * {number of required items} regexps, swap your loops to only compile {number of required items} regexps.
foreach my $item ( @required ) { foreach my $collection ( @collections ) { $collection .= " $item" unless $collection =~ /\b$item\b/; } }
In reply to Re^2: are they all there?
by ikegami
in thread are they all there?
by anadem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |