use FileHandle; $fh = new FileHandle; if ($fh->open("< file")) { print <$fh>; $fh->close; }