The following discussion was posted as comments but they ended up running too long for comments and I guess they do constitute an answer so here it is, expanded.
The problem is not Perl's string-vs-number treatment but the fact that the whole replacement side in s/// is processed as a double-quoted string, yielding a direct replacement for what is matched. The dollar variables, if populated in captures, do get interpolated. So you get the value for $1, followed by the sequence of characters + and 1, and then follow the , and the space and the value for $2 followed by characters + and 1.
One cannot do anything there while you'd like to add as + is meant as an operation. With the /e modifier† the replacement side is evaluated as code and then you can write Perl code in there, so that $1 + 1 is an addition -- but then the whole replacement side is one piece of code, the result of which is used to replace everything matched. Thus the need to use concatenation . in code, to handle (reproduce) the comma and spaces that were matched, etc. We still must capture on the matching side whatever is meant to be available in a dollar variable.
So apart from needing to add $1 and 1 you also need to then tack a comma and a space onto it, and then concatenate the other piece, $2 + 1, so
s/^([0-9]+), ([0-9]+)/($1+1) . ", " . ($2+1)/e
Thus the answer by 0stone0
On the other hand, Perl very readily converts between strings and numbers as needed; one could say that it is even too eager. So if you say on the command line
perl -wE'my $v = "a"; say $v + 1' # warns, converts 'a' to 0, adds
it will treat $v as a number because of that +, and will warn that it isn't numeric (if you enable warnings, what you should) -- and it will do it: 'a' gets converted to 0 and it adds 1 to it.
The capital E there is e with "features" enabled so we can use say. One may avoid to use it in one-liners that are meant for long-term use because things change in the language and with E everything is enabled so one may be using a feature one never even heard of but which at some point ends up affecting the code.
† Search for the word modifier in perlretut: Simple word matching, for example. The full, more strict, reference is perlre.
perl -i.bak -pwe's/\G[, ]*\K\d+/$&+1/ge' complex.txt(using a glue anchor: it's only coquetry to make it shorter)(?{..})that does num++ -> "" as well. Try thisperl -pe "s/^(\d+)(?{$r=$^N+1}), (\d+)(?{$r.=', '.($^N+1)})/$r/" complex.txtonlinegdb.com/2-gl2jAln