in reply to I have Wma file jammed in my regex
Thanks for the pointers. I was embarrassed by all the responses, and I probably shouldn't have posted it. All of the responses were helpful in making changes to the code, but they did not solve the problem.
I tried to find out what pseudo code was, but I think that that may have been some sort of insult.
I'll get around to updating this properly when I figure out what's going on.
Thanks again!
#sifts all the server logs based on media type use strict; my ($type, $server,$out,$in,@input,$total,$kbytes,$mbytes); my @servers=('a','b','c','d','e','f','g','h','i','j','k','l','m','n',' +o','p','q','r','s','t','u','v','w','x','y','z','aa','bb','cc','dd','e +e','ff','gg','hh','ii','jj','kk','ll','mm','nn','oo','pp'); my $dir1='//worksatation/share/dir/'; my @types=('mp3','avi','mpg','mpe','wav','mov','rmj','zip','exe','wma' +); foreach $type (@types){ $total=0; open OUT, ">$dir1/sifted/$type\.txt" or die "Cannot open $out for +write :$!"; foreach $server (@servers){ $in="$dir1/$server\.txt"; open IN,"$in" or next; @input=<IN>; chomp @input; foreach (@input){ if (/\.$type$/i){ $kbytes = (stat)[7]/1024; $total+=$kbytes; print OUT "$_\t$kbytes KB\n"; } } close IN; } $mbytes=$total/1024; print OUT "\n\nTotal: $mbytes MB\n"; close OUT; print "Finished $type...\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid - Pseudo code. OT) Re(2): I have Wma file jammed in my regex
by Ovid (Cardinal) on Jan 19, 2001 at 21:34 UTC |