ultranerds has asked for the wisdom of the Perl Monks concerning the following question:
my $foo = "12314212412124124124.10623"; my $text = sprintf("%.2f", $foo); print $text;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Stupid sprintf question - decimals
by kennethk (Abbot) on Oct 12, 2010 at 15:08 UTC | |
|
Re: Stupid sprintf question - decimals
by ikegami (Patriarch) on Oct 12, 2010 at 15:20 UTC | |
|
Re: Stupid sprintf question - decimals
by Utilitarian (Vicar) on Oct 12, 2010 at 15:05 UTC | |
by Anonymous Monk on Oct 12, 2010 at 15:38 UTC | |
by ultranerds (Hermit) on Oct 12, 2010 at 15:51 UTC | |
|
Re: Stupid sprintf question - decimals
by snape (Pilgrim) on Oct 12, 2010 at 16:18 UTC |