#use strict; #uncomment to kill the code my $s = 'foo'; $$s = 'bar'; print "\$foo = $foo\n"; $foo = 'baz; print "\$\$s = $$s\n"; __END__ Output: $foo = bar $$s = baz #### if ($#-) { no strict 'refs'; print "$#+ matches found", $/; for (1..$#+) { print "\$_ is $_, & \$1 is $1", $/; print "$haystack contains ${$_} at $-[$_]", $/; } }