Open(FH, "something.txt") or die ("could not open it $!\n"); #### use strict; use warnings; use IO::Handle; my $fh = IO::Handle->new; $fh->open('something.txt') or die("could not open file $!\n");