That could simply be:
#!/usr/bin/perl foreach("00001".."00021"){ print "$_\n"; }
Edit: Just showing that the increment operator is a bit magical, but now I see I've probably missed the point a bit.
-Any sufficiently advanced technology is
indistinguishable from doubletalk.
In reply to Re^2: increment # but keep # of digits same
by Hero Zzyzzx
in thread increment # but keep # of digits same
by yankeeblue
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |