You need the mime magic library (have a look at /etc/mime-magic on linux). The File (1) command uses this, and a quick search on CPAN reveals a File::MMagic module which purports to do something similar.
In reply to Re: testing for a zip file
by dtr
in thread testing for a zip file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |