A much safe method:
use IO::File; if( my $fh = new IO::File "file", "r" ) { print <$fh>; $fh->close; }