my $line = ; $line = readline(*FH) if $line =~ /$some_regex/;