With perl -e \'$string=\"a\";print ++$string;\'
we get b
,
but with perl -e \'$string=\"b\";print --$string;\'
we get -1
There are at least three reasons:
Raku (née Perl 6) on the other hand does not suffer from a need for backwards compatibility, and therefore has better behavior for auto-incrementing strings and has auto-decrementing as well. The ++ and -- operators work by calling the succ and pred methods on the object they are operating on.