$ perl -e '$foo = "A short string\n"; $bar = \substr $foo, 0, 1; $$bar = "The"; print $foo' The short string $