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; }
In reply to Re^2: Round numbers?
by Anonymous Monk
in thread Round numbers?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |