#! perl -slw use strict; use threads; use threads::shared; use Data::Rmap; sub thread { my( $hashref ) = @_; rmap{ print "$_"; } $hashref; } my %hash : shared; $hash{ leaf } = 'fred'; $hash{ L1 } = &share( {} ); $hash{ L1 }{ leaf } = 'wilma'; $hash{ L1 }{ L2 } = &share( {} ); $hash{ L1 }{ L2 }{ leaf } = 'bam bam'; $hash{ L1 }{ L2 }{ L3 } = &share( {} ); $hash{ L1 }{ L2 }{ L3 }{ leaf } = 'flintstone'; threads->create( \&thread, \%hash )->join; __END__ P:\test>junk2 fred wilma bam bam flintstone