Trap 2 - a bit more subtle 

while (<$fh>) {
  print if /badger/;
}