if(-T $file) { print "$file is an ascii text file \n"; } else { print "Not an ascii text file \n"; }