in reply to how to Check file type?

An approach might include MIME::Types + File::Basename. That said, you need to remember the extensions do not guarantee content/type-

mv pr0n.jpg annual-report.xls

Replies are listed 'Best First'.
Re^2: how to Check file type?
by liverpole (Monsignor) on Dec 03, 2010 at 15:42 UTC
    What the heck is this adult content doing in my spreadsheet!?!  ;-)
    
    

    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/