#assuming: #use strict; #$q is initialized #sub inerror is defined my @edittypes = qw(.htm .html .txt); my $regex = join "|", map {'\Q' . $_ . '\E'} @edittypes; my $file = $q->param('select'); unless $file =~ /(?:$regex)$/ &inerror("You can only edit @edittypes" +);
--
flounder
In reply to Re: Not equal, regular expressions
by flounder99
in thread Not equal, regular expressions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |