Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Well first of all Im making a shopping cart manager, and when the view cart, somtimes the $price will say $50, or $50.5 or $50.22, But I need to always end in two digits, any ideas, monks
  • Comment on Formatting Numbers (was: adding elements to variables)

Replies are listed 'Best First'.
Re: adding elements to variables
by DamnDirtyApe (Curate) on Jul 24, 2002 at 21:09 UTC
      I would just write to add a link to the excellent tutorial on these functions from reptile here.

       

      A reply falls below the community's threshold of quality. You may see it by logging in.