use warnings; use strict; my $str = 'Str'; my $rStr = \$str; my $rrStr = \$rStr; print "\$rrStr is ref to ref to str\n" if ref $rrStr and ref $$rrStr; print "\$rStr is ref to str\n" if ref $rStr; print "\$str is str\n" if ! ref $str;