It's a bug that's been fixed in 5.22.0.
Assignment to a lexical scalar is often optimised away; for example in
C<my $x; $x = $y + $z>, the assign operator is optimised away and the
operator writes its result directly to C<$x>. Various bugs related to
this optimisation have been fixed. Certain operators on the right-han
side would sometimes fail to assign the value at all or assign the wro
value, or would call STORE twice or not at all on tied variables. The
operators affected were C<$foo++>, C<$foo-->, and C<-$foo> under C<use
integer>, C<chomp>, C<chr> and C<setpgrp>.