in reply to adding 1 to a char of 1

substr and string increment can make that even easier,

my $file = 'name_0009'; substr($file, 5, 4)++; print $file, "\n";
which prints "name_0010".

The substr function is an lvalue, so any sort of mutator can be applied to it.

After Compline,
Zaxo