sub test { my $size = 1000000; my %hash; @hash{1..$size} = (rand()) x $size; sleep 5; print keys %hash; } test(),sleep 5 for 1..10;