use IO::File; my @data; if (-e $file) { print "\nopen $file\n"; } if (my $fh->open("$file, r")) { print "I'm in\n"; @data = <$fh>; $fh->close; }