in reply to adding 1 to a char of 1

You haven't given us much to go on, but I'm guessing that you have some kind of serialized filename (a dataset name perhaps?), and you want to produce the next filename in the series. In such a case, the following approach would work for you:
use strict; my $oldfile = '0001'; my $newfile = sprintf("%4.4d", $oldfile + 1); print "New filename = $newfile\n";

Replies are listed 'Best First'.
Re^2: adding 1 to a char of 1
by Anonymous Monk on Jun 20, 2006 at 17:24 UTC
    Yes thats exactually what Im doing..