my $str = 'encoded text'; say join '', ( map { chr ord( $_ ) + 1 } split //, $str ), 0;