my fh = IO::File->new; $fh->open($file, O_RDWR) or die $!; oder $fh->open($file, "r") or die $^E;