Using grep, you can store to a list with qw and match to it. This eliminates the need for the messy | and other such delimiters. If I find myself using delimiters, I like to use non-keyboard delimeters ( chr(1); #for example ). Have fun.my @phrases = qw{ one two three } ; my $in = 'three' ; if ( grep ( /$in/, @phrases ) ){ ... }
In reply to Re: Matching a long list of phrases
by Bro. Doug
in thread Matching a long list of phrases
by Hagbone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |