for (1..3) { no strict 'refs'; my $ref = \${'str'.$_}; # this creates a hard reference VIA a symbolic reference # or: my $ref = "str$_"; # this is a purely symbolic reference, access is the same as above print "The string is $$ref"; } #### #!/usr/bin/perl -l use warnings; use strict; our $str1 = qq[A-M o'Foo']; our $str2 = qq[.,rtyu_'']; our $str3 = qq[$<%^]; our $str4 = qq[this works]; my $ref4 = \$str4; print $$ref4; # works as expected for (1..3) { no strict 'refs'; my $ref = \${'str'.$_}; print "The string is $$ref"; }