in reply to Question: module to grab file information??

I haven't used File::Type myself, but it looks like what you want. You can also use backticks to call file, if you want.

Update: Actually, I have used File::Type, but it was so long ago, I forgot. It worked fine at the time.