Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Answer: How do I determine encoding format of a file ?

by particle (Vicar)
on May 10, 2003 at 02:35 UTC ( #257057=categorized answer: print w/replies, xml ) Need Help??

Q&A > files > How do I determine encoding format of a file ? - Answer contributed by particle

have a look at File::MMagic, it guesses the filetype given the filename or a filehandle, and is quite configurable (you can add more file type descriptions based on regular expressions.) it's a handy little module.

  • Comment on Answer: How do I determine encoding format of a file ?