use strict; my $oldfile = '0001'; my $newfile = sprintf("%4.4d", $oldfile + 1); print "New filename = $newfile\n";
In reply to Re: adding 1 to a char of 1
by MonkE
in thread adding 1 to a char of 1
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |