[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-AnyPerl] using open() on zipped files



Folks,

I have a number of large zipped log files. I ran our Web log 
reporting program (WebTrends) on them but the higher-ups would like 
other sorts of reports. They are proxy logs and the program gives 
'top 10' (or 20, 50, etc.) but the desire is to track a particular 
resource over time, for example. I've done this on these files by 
unzipping and running on a group of them. There has to be a better 
way and I'm open to suggestions.

This is more of a novice question, but I was wondering about the 
actual operation of the 'open()' function. I consulted Programming 
Perl and couple of other books and it seems like this function opens 
a connection to the a file and then the data is read a record (line) 
at a time. Do I have this right? On the Mac, I'm concerned about 
exceeding available memory. Manually opening the files exceeds memory 
quickly and I'm wondering if using perl and open on the file is most 
efficient.

I also did find a Zip module on CPAN which will zip and unzip, etc. 
but I'd like tips on best practice, if this is the way.

As I said, I'm open to suggestions. Thanks in advance.

Paul
----

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org