You can use File::MMagic, but be forewarned, I didn't find it very fast.
Update: ah, good point Arturo. I hadn't fully comprehended the question's substance. Catagorizing by filename extension seems like the best solution.
In reply to Re: file type
by eg
in thread file type
by ashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |