in reply to Re: Re: Re: Zero Padding to the Right of the Decimal
in thread Zero Padding to the Right of the Decimal
you'll never exit the loop that way, because you never modify $i.
You could use +=, though :
You could use +=, though :
my $i=0; while ($i <=100){ printf("%3.2f\n",$i+=0.01); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Re: Re: Zero Padding to the Right of the Decimal
by revdiablo (Prior) on Jan 15, 2004 at 21:54 UTC |
In Section
Seekers of Perl Wisdom