You should look at sprintf. With it you can map numbers into numeric strings with leading zeros.
You can use that in your loop as, my $new = 'snowscene.' . sprintf( '%04d', $loop) . '.jpg';for (0..102) { $_ = sprintf "%04d\n", $_; print; }
After Compline,
Zaxo
In reply to Re: renaming a list of files
by Zaxo
in thread renaming a list of files
by gmo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |