$foo=42; print nameThatVariable($foo); # '$foo', of course. $foo=[ 42 ]; print nameThatVariable($foo); # still '$foo'. @bar=( 42 ); print nameThatVariable(@bar); # '@bar', of course. $baz=$foo=\@bar; print nameThatVariable($foo); # 'reference to @bar' or '$foo'? print nameThatVariable($baz); # 'reference to @bar' or '$foo' or '$baz' ? print nameThatVariable(\@bar); # 'reference to @bar'? print nameThatVariable(do { my $tmp=23 }); # '$tmp'? print nameThatVariable([ 23,45 ]); # ?