Moon, John wrote:
From: John W. Krahn [mailto:[EMAIL PROTECTED]

Here is another way to do it:

my $logs_total = () = <*log>;
my $processed = @ARGV = <access_sun83*log>;
my %logs;
$logs{ $ARGV }++ while <>;

print "There are $logs_total logs HERE\n";
print "I processed $processed logs\n";
for my $filenm ( sort keys %logs ) {
     print "There are $logs{$filenm} items in $filenm\n";
     }

John
[>>] Look like it gave someone some ideas... ;-)
Since we're "going there" you _should_ also check on *close* (on an
output file) - may save you a lot of time...

As for slurping in a "log" file ... some can be *very* large...

Nowhere in the code that I posted are the "log" files being "slurped in", only one line is being read at a time.



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to