use strict; use warnings; open IN, "test.txt" or die "Could not open 'test.txt'\n"; for() { # do nothing } close IN;