in reply to parse gzipped weblogs

Coincidentally, I am in the middle of working with gzipped logs myself. Perl, by itself, does not "understand" gzip files. You must make it understand by using Compress::Zlib or IO::Zlib. I prefer the latter, as it emulates the IO::* interface and makes your code a lot easier to work with. That said, you can do something like this:
use strict; use warnings; use IO::Zlib; # also uses Compress::Zlib my @hostnames = qw(baloo beast belle chip cogsworth lefou potts); my $timestamp = $ARGV[0]; foreach my $host ( @hostnames ) { my $logpath = "/archive/$host/www/logs/access_log.$timestamp"; my $fh = IO::Zlib->new($logpath, "r"); die "Cannot open $logpath: $!" if !$fh; # Probably good to check Compress::Zlib::gzerrno, too. while ( <$fh> ) { # do text processing here }; $fh->close; }
As for your third question, I'm not quite sure what you mean. I tend to use Date::Manip for all of my happy-fun date processing.