how to test all files in array exist in the tar using Archive::Tar
I got a to go to check whether the files in [at] somefiles exist in $filltar
my $fultar = 'something.tgz"
[at] somefiles = qw(xsl/photos_videos.xsl
xsl/research.xsl
xsl/reviews.xsl
xsl/sendemail.xsl
xsl/slideshow.xsl
xsl/slideshow_details.xsl );
$tar->add_files( [at] allfiles_excluded);
$tar->write( $fultar, 9 );
i also need to test the tar file in , i cant find a option in
Archive::Tar , some thing similar to tar -tvf sometar.tgz
Can some one help me with this .
thanks
--
Regards
Agnello D'souza
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: how to test all files in array exist in the tar usingArchive::Tar
At 6:04 PM +0530 4/26/11, Agnello George wrote:
>I got a to go to check whether the files in [at] somefiles exist in $filltar
$filltar or $fultar?
>my $fultar = 'something.tgz"
>
> [at] somefiles = qw(xsl/photos_videos.xsl
>xsl/research.xsl
>xsl/reviews.xsl
>xsl/sendemail.xsl
>xsl/slideshow.xsl
>xsl/slideshow_details.xsl );
>
>
>$tar->add_files( [at] allfiles_excluded);
> $tar->write( $fultar, 9 );
Have you read the Archive::Tar documentation? Either 'perldoc
Archive::Tar' on a command-line or here:
<http://search.cpan.org/~bingos/Archive-Tar-1.76/lib/Archive/Tar.pm>
Have you tried the contains_file($filename) method listed there? Be
sure to include the full path if you do.
>
>i also need to test the tar file in , i cant find a option in
>Archive::Tar , some thing similar to tar -tvf sometar.tgz
Have you tried the list_files method of Archive::Tar?
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: how to test all files in array exist in the tar using Archive::Tar
On Tue, Apr 26, 2011 at 9:04 PM, Jim Gibson <jimsgibson [at] gmail.com> wrote:
> At 6:04 PM +0530 4/26/11, Agnello George wrote:
>>
>> I got a =A0to go to check whether =A0the files in =A0 [at] somefiles =A0exist=
=A0in
>> $filltar
>
> $filltar or $fultar?
>
>> my $fultar =3D 'something.tgz"
>>
>> [at] somefiles =A0=3D qw(xsl/photos_videos.xsl
>> xsl/research.xsl
>> xsl/reviews.xsl
>> xsl/sendemail.xsl
>> xsl/slideshow.xsl
>> xsl/slideshow_details.xsl );
>>
>>
>> $tar->add_files( [at] allfiles_excluded);
>> =A0$tar->write( $fultar, =A09 );
>
>
> Have you read the Archive::Tar documentation? Either 'perldoc Archive::Ta=
r'
> on a command-line or here:
>
> <http://search.cpan.org/~bingos/Archive-Tar-1.76/lib/Archive/Tar.pm>
>
> Have you tried the contains_file($filename) method listed there? Be sure =
to
> include the full path if you do.
>
>>
>> i also need to test =A0the tar file in =A0, i cant find a option in
>> Archive::Tar , some thing similar to tar -tvf sometar.tgz
>
> Have you tried the list_files method of Archive::Tar?
>
>
yes $tar->contains_file( $filename ) is exactly what i am looking for .
Thanks
--
Regards
Agnello D'souza
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/