use autodie; open my($stuff), '<', 'in.txt' ; # with autodie, no need to "or die" ... <$stuff> ... close $stuff; # with autodie, no need to "or die"