in reply to Re: Round numbers?
in thread Round numbers?
for my $n (@nra) { my $fmt = $n > 0.001 ? '%5.2g' : '%5.3g'; printf qq{$fmt \n}, $n; }
for my $n (@nra) { my $fmt=$n; if($n>0.001){ ????? } else { ?????? } printf qq{$fmt \n}, $n; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Round numbers?
by AnomalousMonk (Archbishop) on Oct 02, 2009 at 00:05 UTC | |
by Anonymous Monk on Oct 02, 2009 at 00:51 UTC |