To adress each point:
- That's a goof left over from development. Oops. Fixes the 3rd point you make as well.
- I agree that using -w and 'use strict;' are excellent
things to do. However, I intended this to be used on the
command line either as an alias or shell script somewhere
in the your $PATH. I want it to be faster,
rather than slower. Granted, the differences are small, I
admit. Blindly following the dogma of "must use strict
and -w all the time" is dangerous, just as blindly following
any dogma is. That said, I use strict; and -w almost always.
- Noted.
- I've already taken care of this, or did you not see the -k flag
I passed to 'df'? This forces df to print it's numbers in 1Kb blocks
instead of the system default block size (which is not always 1024 bytes).
Since the numbers are in Kb, I don't have to worry about stripping any metrics, and the 'funny math' becomes trivial.
Not all versions of 'du' support Linux's -h tag, but they do support -k.
In any case, I'll make a few refinments...