David Mertens schrieb:
I don't know if I add much to the conversation by simply referring you to Stack 
Overflow, but I've found that it's a decent repository of information for this sort 
of question. This question has been asked and answered before 
<http://stackoverflow.com/questions/22827465/what-perl-module-turns-a-file-extension-txt-jpeg-into-a-mime-type-text-pla/22832209#22832209>,
 and the answer suggests MIME::Types, but also suggests some content introspection, 
for which File::Type and File::MimeInfo::Magic get a mention.

I have never used any of these, so I cannot vouch for them myself.

One problem is that the definitions change over time, and some of
the modules for this purpose seem pretty old.

For now, File::MimeInfo::Magic works ok.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to