#!/usr/bin/perl -l use warnings; use strict; my $str1 = qq[A-M o'Foo]; my $str2 = qq[.,rtyu_']; my $str3 = qq[$<%^]; my $str4 = qq[this works]; my $ref4 = \$str4; print $$ref4; # works as expected for (1..3) { my $ref = \${'str'.$_}; print "The string is $$ref"; } #### this works Error:17: Can't use string ("str1") as a SCALAR ref while "strict refs" in use