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"; }

-OzzyOsbourne


In reply to Re: I have Wma file jammed in my regex by OzzyOsbourne
in thread I have Wma file jammed in my regex by OzzyOsbourne

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.