in reply to Re^2: filehandle regex
in thread filehandle regex

The my $prev part is there to properly declare the variable. The = "" is there to not have warnings if the first line actually matches. The ; is there to separate statements.