in reply to Re^3: Help! Stuck on methods to count file size.
in thread Help! Stuck on methods to count file size.

Super Monker, please allow me to ask you for further advise of how can I count the uncompressed size of the files in each month in Julian order? As of if we know the ratio of the uncompressed file size is the file size * 2, it'll make the process much easier. Suppose add something in the code as below:
(${$m[$day]}{'bytes'} += $value, *2${$m[$day]}{'files'})
Or something as the likes...

Replies are listed 'Best First'.
Re^5: Help! Stuck on methods to count file size.
by Lennotoecom (Pilgrim) on Oct 19, 2013 at 15:38 UTC
    This part:
    ${$m$day}{'bytes'} += $value
    summing your bytes, and this part:
    ++${$m$day}{'files'}
    counting the amount of processed files.
    So if you wish to double your bytes you should do:
    ${$m$day}{'bytes'} += (2* $value)
    while(<DATA>){ ($day, $value, $name) = split / /; print "$day $value\n"; ${$m[$day]}{'max'} < $value ? (${$m[$day]}{'max'} = (2* $value), ${$m[$day]}{'bytes'} += (2* $value), ++${$m[$day]}{'files'}):( ${$m[$day]}{'bytes'} += (2* $value), ++${$m[$day]}{'files'}) ; }

    test it on some unsignificant data first.(always)

      Dear Master, it's a great pleasure to find your post on counting uncompressed and compressed files that I requested a month ago. I'll test it soon but I am sure it'll surprisingly generate the correct result. You are so respectable to all the learners, so much appreciate your creative contribution!

        Well mate, If I could help, I'm glad.
        But check out for mistakes anyway, cuz I aint no master. :)