good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Perl -T vs Mime::Typesby RonW (Parson) |
on Sep 21, 2017 at 23:37 UTC ( [id://1199857]=note: print w/replies, xml ) | Need Help?? |
Or check that it matches application/octet-stream MIME type Actually, for your purpose, text/plain would be the appropriate type. -T is probably good enough to catch any files that aren't yet fully decoded/decompressed/etc. Caveats: -T will accept valid UTF-8 encoded data as text. Also, even if the data isn't valid UTF-8, it will still allow some non-ASCII bytes and accept it as ASCII text. (The documentation says up to a third of the examined part of the file.)
In Section
Seekers of Perl Wisdom
|
|