Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: testing for a zip file

by asarih (Hermit)
on Aug 29, 2003 at 14:35 UTC ( #287676=note: print w/replies, xml ) Need Help??


in reply to testing for a zip file

You can (in no particular order)
  1. call qx[ file $file ] and grep if the output says it's a ZIP file
  2. read the first few bytes and see if they match the string PK\003\004
  3. use Archive::Zip (this may or may not help)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://287676]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-10-06 10:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?