Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to properly recursively navigate into archives stored in archives

Reply
Thread Tools

How to properly recursively navigate into archives stored in archives

 
 
David Karr
Guest
Posts: n/a
 
      06-01-2012
I have a small perl script that I use to search archives for members matching a name. I'd like to enhance this so that if it finds any members in thearchive that are also archives (zip, jar, etc) it will then recursively scan those, looking for the original desired pattern.

I've looked through the "Archive::Zip" documentation, and I thought I saw how to do this. I noticed the "fh()" and "readFromFileHandle()" methods. However, in my testing, it appears that the "fh()" call on an archive memberreturns the file handle for the containing archive, not the member. Perhaps I'm doing it wrong, but I appreciate an example of how to do this.
 
Reply With Quote
 
 
 
 
David Karr
Guest
Posts: n/a
 
      06-01-2012
On Friday, June 1, 2012 9:57:01 AM UTC-7, David Karr wrote:
> I have a small perl script that I use to search archives for members matching a name. I'd like to enhance this so that if it finds any members in the archive that are also archives (zip, jar, etc) it will then recursively scan those, looking for the original desired pattern.
>
> I've looked through the "Archive::Zip" documentation, and I thought I sawhow to do this. I noticed the "fh()" and "readFromFileHandle()" methods. However, in my testing, it appears that the "fh()" call on an archive member returns the file handle for the containing archive, not the member. Perhaps I'm doing it wrong, but I appreciate an example of how to do this.


I got this answered, at: http://stackoverflow.com/questions/1...-archive-files
 
Reply With Quote
 
 
 
 
J. Gleixner
Guest
Posts: n/a
 
      06-01-2012
On 06/01/12 11:57, David Karr wrote:
> I have a small perl script that I use to search archives for members matching a name. I'd like to enhance this so that if it finds any members in the archive that are also archives (zip, jar, etc) it will then recursively scan those, looking for the original desired pattern.
>
> I've looked through the "Archive::Zip" documentation, and I thought I saw how to do this. I noticed the "fh()" and "readFromFileHandle()" methods. However, in my testing, it appears that the "fh()" call on an archive member returns the file handle for the containing archive, not the member. Perhaps I'm doing it wrong, but I appreciate an example of how to do this.


Keep looking at the documentation.. I haven't used it, but a quick
read and it looks like members(), and/or membersMatching() methods
seem to be what you're after.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
translating an OS directory recursively into a tree object Mathematisch Perl Misc 8 01-08-2010 11:20 PM
how to convert an array into a recursively calling string Wrapster Aol Ruby 0 10-03-2008 03:19 PM
Recursively listing files into directories Alain.Feler Ruby 3 05-15-2005 06:09 PM
More American Graffiti: Properly Framed, Properly Scored? Scot Gardner DVD Video 0 09-02-2003 02:28 AM



Advertisments