in reply to I have Wma file jammed in my regex

I don't know if this will solve your problem, but it seems like you're opening each server log 1x for each data type, which is a pretty big waste of time seeing as how your media type list is short, and your server logs are (almost certainly) alot bigger. This is extremely inefficient.

A better way to do it would be to put the loop for your servers on the OUTSIDE, and then loop (or regex, or whatever) through each data type. This means your computer doesn't have to open (and read!) each server log more than once. Kinda like this pseudo-code:

for $server(@servers) { my (@open, %found_total); # Initialize for each run open IN, $server; while (<IN>) { # Keeps from loading the whole file in for $type($mediatypes) { if (/\.$type) { my $kbytes = (stat)[7]/1000; $found_total{$1} += $kbytes; push @output, ("$_ : $kbytes"); } } } # Output your @output array here if you want, # and/or %found_total (which contains the kbyte totals) }
You'll probably be able to speed this up even more if you just put in an all encompassing regex instead of a loop for the media types. But however you do it you'll be better off putting the big things on the outside, and the little things on the inside.

Gary Blackburn
Trained Killer