#! perl -slw use strict; use threads; my $tid = threads->tid; our $fred = 12345; print "$tid : $fred"; my $t = threads->create( sub{ my $tid = threads->tid; our $fred; print "$tid : $fred"; $fred = 54321; print "$tid : $fred"; } )->join; print "$tid : $fred"; $fred = 'fred'; print "$tid : $fred"; __END__ C:\test>junk 0 : 12345 1 : 12345 1 : 54321 0 : 12345 0 : fred