use strict; use warnings; open (IN,"){ do_something_with_line(); } close(IN);