dnt_knw_perl has asked for the wisdom of the Perl Monks concerning the following question:

I need to loop through multiple files in /perl/peg_20130306.csv to calculate month to date total for each of the lines in the file in the /perl/* and email that report out. 6,TOTAL,33840350 7,TOTAL,29402046 10,TOTAL,75105 11,TOTAL,62376 12,TOTAL,2291202 13,TOTAL,741622 16,TOTAL,5053972 27,TOTAL,2638 32,TOTAL,31919410 33,TOTAL,14596914 35,TOTAL,20608 36,TOTAL,37097997 37,TOTAL,92162 41,TOTAL,32411120 42,TOTAL,2095496 54,TOTAL,2993

Replies are listed 'Best First'.
Re: Perl summation
by Cristoforo (Curate) on Mar 07, 2013 at 03:28 UTC
    I assume your file looks like:
    6,TOTAL,33840350 7,TOTAL,29402046 10,TOTAL,75105 11,TOTAL,62376 12,TOTAL,2291202 13,TOTAL,741622 16,TOTAL,5053972 27,TOTAL,2638 32,TOTAL,31919410 33,TOTAL,14596914 35,TOTAL,20608 36,TOTAL,37097997 37,TOTAL,92162 41,TOTAL,32411120 42,TOTAL,2095496 54,TOTAL,2993
    How do you find the month each file belongs to?

    /perl/* doesn't tell me much.

    See: How do I post a question effectively?
    Markup in the Monastery

Re: Perl summation
by Anonymous Monk on Mar 07, 2013 at 10:21 UTC