in reply to Using Magic Numbers
There's always the unix utility 'file', which unfortunately doesn't seem to have a CPAN equivalent (unlike quite a few other unix file utilities). Maybe this is something worthy of consideration?
Update: I thought one didn't exist, having never encountered one, none turning up on a CPAN search, and none being registered in the File:: namespace. Obviously, I was wrong. Use File::MMagic as artist suggests ;)
In Section
Seekers of Perl Wisdom