in reply to Reading and executing RegExp from text file
while (my $regex = <FILE>) { chomp $regex; if (length($regex) > 1 && $sampletext =~ $regex) { ... } } [download]