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...
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|