# build a regex matching any of an array of strings $re = qr/@{[join "|", map { quotemeta $_ } sort { length $b <=> length + $a } @strings]}/;
In reply to Re: Common Perl Idioms
by ysth
in thread Common Perl Idioms
by eric256
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |