use strict; use forks; use forks::shared; my $t = time; my %hash : shared = (); share( %hash ); $hash{ $_ } = $_ % 2 for( 1..500 ); print "$_: $hash{ $_ }\n" for( sort { $a <=> $b } keys %hash ); print "Elapsed: " . (time - $t) . "\n"; exit 0; #### use strict; my $t = time; my %hash = (); $hash{ $_ } = $_ % 2 for( 1..500 ); print "$_: $hash{ $_ }\n" for( sort { $a <=> $b } keys %hash ); print "Elapsed: " . (time - $t) . "\n"; exit 0;