I like this code; it works great for me.

One drawback is that when I use it for "ls -l" output as suggested, the year is commified as well as the file size. (For my older files, obviously). This then tends to mess up the column alignment, which the author had intended to preserve.

total 6,592 drwxr-xr-x 2 kromk apbr 118,784 Jun 29 1,998 DSC/ -rwxr-xr-x 1 kromk apbr 7,597 Oct 31 16:25 KEAVT.KTC* drwxr-xr-x 7 kromk apbr 4,096 Oct 17 1,999 archive/ drwxr-xr-x 6 kromk apbr 4,096 Aug 7 2,000 backup/ drwxr-xr-x 46 kromk apbr 8,192 Mar 7 14:03 build/ drwxr-xr-x 9 kromk apbr 16,384 Mar 8 17:28 download/

Goes to show that you can't have everything...

buckaduck


In reply to Re: Add coma to numbers, a bit better by buckaduck
in thread Add commas to numbers, a bit better by fundflow

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.