in reply to How do I parse and evaluate a file line-by-line?

one way is like this:
#!/usr/bin/perl -w use strict; my $file = "/home/trix/lines"; my $line; my @array; open (FILE, "$file") || die "Can't open $file: $!\n"; while ($line = <FILE>) { chomp $line; next unless ($line =~ /Down/); my ($downtime, $down) = split(' ', $line); push (@array, $downtime); } my $agg = eval join '+', @array; #the above beauty came from somewhere here; don't remember where print "My downtime is $agg\n";
....if I am understanding correctly that the first element in each log file is actually a number, and there is only one other element, the interesting one being "Down".