{ my $s; sub str :lvalue { $s } } str = "japhy"; pos(str) = 2; print pos(str); # prints 2! str =~ /\G(.)/ and print $1; # prints 'j', not 'p' print pos(str); # prints 2!