is the file a readable file?
#!/usr/bin/perl use strict; use warnings; foreach my $file ( @ARGV ) { print( "Checking $file: " ); if ( -e $file ) { print( "$file exists!\n" ); if ( -f $file ) { print( "The file $file is:" ); print( " readable" ) if ( -r $file ); } elsif ( -d $file ) { print( "$file is a directory!\n" ); } } else { print( "$file doesn't exist.\n" ); } print( "\n" ); }