in reply to Re: string increment
in thread string increment

well have a look at the "perlop" documentaion (auto-increment operator) to read about the behaviour.

as for the "increment the whole string" comment, you are doing. If you increment the number 4356 to 4357, you only change one 'character', but you are operating on the whole 'string'. This is exactly the same for your example, where only the last character has rolled over, which increments the last but one. If you want to increment each character in the string, you may want to do something like this.

$sample='prad'; print join('', map { ++$_} split(//, $sample) ); print"$sample";
but be careful, incrementing 'z' in this fasion would return 'aa'
---
my name's not Keith, and I'm not reasonable.