$ cat 1042506.pl #!/usr/bin/env perl use strict; use threads; use Thread::Queue; my $q=Thread::Queue->new; my $progref; my $thr=async { $progref=$q->dequeue; #This seems to create a local $progref, but it shouldn't! print "In main part of thread \$progref=$progref\n"; $$progref=30; #This is applied ch(); #This is ignored }; my $prog :shared; $q->enqueue(\$prog); sleep 2; print "$prog\n"; #Prints 30, not 90 $q->end; $thr->join; sub ch { print "In ch \$progref=$progref\n"; #progref is still undefined (why?) $$progref=90; } $ perl 1042506.pl In main part of thread $progref=SCALAR(0x84bfa60) In ch $progref=SCALAR(0x84bfa60) 90