#!/usr/bin/perl -wT use strict; use vars qw($foo $bar); $foo = 'x'; $bar = int(rand(2)) ? 'foo' : \$foo; print $$bar, "\n"; =OUTPUT (when rand==0) x =OUTPUT (when rand==1) Can't use string ("foo") as a SCALAR ref while "strict refs" in use at ./strictrefs.pl line 9.