in reply to testing for a zip file
open(F, "file.zip") || die "File open failed: $!\n"; if(read(F, $buffer, 2)){ if($buffer eq 'PK'){ print "We have a zip\n"; }else{ print "No zip here\n"; } } close(F);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: testing for a zip file
by ChrisS (Monk) on Aug 29, 2003 at 14:27 UTC | |
by tcf22 (Priest) on Aug 29, 2003 at 14:33 UTC | |
|
Re: Re: testing for a zip file
by adrianh (Chancellor) on Aug 29, 2003 at 21:10 UTC |