Like if I had the number 100, it would write 0100. If the number was 7, it would be 0007. And if the number was 8010, no 0 would be added.
my $count = 0; foreach my $line (@line) { # these are defined in my script $count++; print $count; # prepend all the requires 0s. }
In reply to Prepending 0's to 1000 by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |