1 2 3 4 5 6 7
my @evil = qw[logout exit]; my $c = '[img]http://0day.de/logout[/img]'; foreach my $e (@evil) { ($c =~ m,/$e\s*\[(?:/|\|)\w*\],)?die "ALERT :$e":1; }