![]() |
|
Perl: the Markov chain saw | |
PerlMonks |
Re: Help with Numbers..Pleaseby Anonymous Monk |
on Apr 24, 2003 at 14:52 UTC ( [id://252914]=note: print w/replies, xml ) | Need Help?? |
Hi Gareth,
Use regular numbers to do your calculation and sprintf back into the value that you need. See code below.
#!/usr/bin/perl
for (0..10)
{
my $value = sprintf("%.5d",$_);
print $value,"\n";
}
In Section
Seekers of Perl Wisdom
|
|