Trap 2 - a solution
Assume $_ is volatile
while(my $line = <$fh>) { print $line if contains_badger($line); }