in reply to Re: Reverse grep?
in thread Reverse grep?

You need to add this:
while (<FILE>) { + chomp; if ( $ENV{"REDIRECT_URL"} +~ /$_/ ) { print $_; last; }
Otherwise, you have a trailing newline at the end of your pattern.