#!perl use strict; # You *must* use "our" instead of "my" here # or, you can omit the 'use strict;' above and avoid # the 'my/our' issue altogether. our $wonderFull = "The String I want to get at\n"; my $var1 = "wonder"; my $var2 = "Full"; my $temp; { # use some symbolic variable references within this scope no strict qw/refs/; # dereference "wonderFull" and copy the contents to $temp $temp = ${ $var1 . $var2 }; print $temp; # make the variable name so we can assign to the symbolic variable $temp = $var1 . $var2; # now assign to $wonderFull $$temp = "new string\n"; } # note that the contents of $wonderFull have changed print $wonderFull;