C:\chas_sandbox> perl -Mdiagnostics -le "sub doit{$ref=$_;${$ref} = 'nope'};$str='cwh';print $str ;doit(\$str);print$str" cwh cwh C:\chas_sandbox> perl -Mdiagnostics -le "sub doit{$ref=$_;${$ref} = 'nope'};$str='cwh';print $str ;doit(\\$str);print$str" cwh cwh C:\chas_sandbox> perl -Mdiagnostics -le "sub doit{$ref=$_;$$ref = 'nope'};$str='cwh';print $str;d oit(\\$str);print$str" cwh cwh C:\chas_sandbox> perl -Mdiagnostics -le "sub doit{$ref=$_;$$ref = 'nope'};$str='cwh';print $str;d oit(\$str);print$str" cwh cwh C:\chas_sandbox>