cajun has asked for the wisdom of the Perl Monks concerning the following question:
This snippet of code gives me: "No such file in archive: 'Archive::Tar::File=HASH(0xa1189a4)'". Which I believe means $file is a hash ref. But I'm not sure where to go from here.foreach (@sorted){ my $tar = Archive::Tar->new($_); my @files = $tar->get_files; foreach my $file (@files){ $tar->extract_file($file, "./EXTRACTED/$_"); } }
Where am I going wrong here?
Thanks,
Mike
Update: Thanks tlm & itub, list_files was the issue!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Archive::Tar extract_file
by tlm (Prior) on Jul 24, 2005 at 03:41 UTC | |
|
Re: Archive::Tar extract_file
by itub (Priest) on Jul 24, 2005 at 03:42 UTC | |
|
Re: Archive::Tar extract_file
by graff (Chancellor) on Jul 24, 2005 at 23:21 UTC | |
|
Re: Archive::Tar extract_file
by saintmike (Vicar) on Jul 25, 2005 at 02:13 UTC |