(s)?printf will do what you want without difficulty–
perl -e 'printf "%04d\n", $_ for 0 .. 9999'
Update, swapped the 1 for a 0.
In reply to Re: looping efficiency
by Your Mother
in thread looping efficiency
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |