"next unless -f $file && -T $file"
That's a little bit tautologous. If it's not a file, it's never going to be a text file :) And if it is a text file, my guess is that it's also a file :)
The only question with file testing (when not running as root) is whether you have permission to test the file. We run some file tests through sudo on web servers when testing user's files - otherwise you get unexpected results when testing files with permissions 600 / 700 etx.
cLive ;-)
In reply to Re: How reliable is -T as a test for ASCII files?
by cLive ;-)
in thread How reliable is -T as a test for ASCII files?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |