in reply to Without Unzipping and without using Archive module Can we read the file in zip file
As VinsWorldcom already said, Yes, even you can use CPAN.
But luckily, IO::Uncompress::Unzip is a core module:
use warnings; use strict; use IO::Uncompress::Unzip (); my $filename = 'foo.zip'; my $membername = 'bar.txt'; my $z = IO::Uncompress::Unzip->new($filename, Name=>$membername) or die "unzip failed: $IO::Uncompress::Unzip::UnzipError\n"; while (my $line = <$z>) { # do something with each $line } $z->close;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Without Unzipping and without using Archive module Can we read the file in zip file
by Anonymous Monk on Mar 01, 2018 at 14:18 UTC |