LINE: while(<>) { # ... next LINE if ... # ... } SEARCH: for (@list) { # ... last SEARCH if ... }