in reply to How do I determine encoding format of a file ?

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 Re: How do I determine encoding format of a file ?