in reply to Numbers....
Try something like this:
printf "%10.2f\n", $variable;
This will print $variable in a 10 character field with 2 places after the decimal. Change the formatting numbers to suit your needs (%.1f would fit above).
The 'f' tells you the number is a floating point.
Chapter 6 of _Learning Perl_ gives a few more examples.
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
|
|---|