Dan Muey wrote:
>
> Or would this be right for grabbing a certain file fomr a multi file zip archive:
> (long variable names are just for descriptive purposes ;p)
>
> for($zip->members) {
> if($_->fileName =~ $filenameinzipiwanttograb) {
> $_->extractToFileNamed($filenameiwanttocreathere) or die 'error here';
> }
> }

Not quite. The methods return error codes which you can define by

  use Archive::Zip qw/:ERROR_CODES/;

and success (AZ_OK) just happens to be zero!

  my $member = $zip->memberNamed($filenameinzipiwanttograb);
  my $rc = $member->extractToFileNamed($filenameiwanttocreathere);
  die 'error here' unless $rc == AZ_OK;

read the POD :)

Rob



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to