APM: 2 digit variables OR integers?

Evan Harris eharris at puremagic.com
Mon Dec 5 15:55:50 PST 2005


Assuming you want rounding, the generally accepted practice is to use
$num = sprintf("%.02f", $num);

Evan


On Mon, 5 Dec 2005, CaptNemo wrote:

> Is there a SIMPLE way limit PERL variables to 2 digits  (for handling money
> tasks)?
>
>
> AND/OR
>
>
> How do you get an integer?         Is it: INT($variable) ?
>
> _______________________________________________
> Austin mailing list
> Austin at pm.org
> http://mail.pm.org/mailman/listinfo/austin
>



More information about the Austin mailing list