in reply to Re^2: Round numbers?
in thread Round numbers?

No, like:
for my $n (@nra) { my $fmt; if ($n > 0.001){ $fmt = '%5.2g'; } else { $fmt = '%5.3g'; } printf qq{$fmt \n}, $n; }
See Conditional Operator in perlop.

Note that
    $x = $y > $z ? 'foo' : 'bar';
is perhaps more clearly written as
    $x = ($y > $z) ? 'foo' : 'bar';

Replies are listed 'Best First'.
Re^4: Round numbers?
by Anonymous Monk on Oct 02, 2009 at 00:51 UTC
    A million thanx to you! It was very kind you explained all that to me!