in reply to How do I print a large integer with thousands separators?

Modify $#, probably (see perlvar) or use sprintf. Normally, perl prints without thousands separator.
  • Comment on Re: How do I print a large integer with thousands separators?

Replies are listed 'Best First'.
Re: Answer: How do I print a large integer with thousands separators?
by davorg (Chancellor) on Oct 09, 2001 at 15:50 UTC

    Camel 3 has this on page 657:

    $# [XXX,ALL] Don't use this; use sprintf instead.

    And on the previous page, "XXX" is defined as meaning:

    Deprecated, do not use in anything new.
    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you don't talk about Perl club."

Re: Answer: How do I print a large integer with thousands separators?
by Hofmator (Curate) on Oct 09, 2001 at 19:08 UTC

    In addition to the deprecatedness of $# mentioned by davorg, how would you go about using sprintf to put thousands separators into numbers? I don't see a simple way to do this - if there was it'd be mentioned in the perlfaq to this topic, I'd guess.

    -- Hofmator