local @ARGV = ("input.file"); while(<>) { s/pattern//; # remove line matching pattern print; last if eof; }