do{ my $pid = open my $in, "p:/test/dummy.exe |" or die $!; $pid{ $pid }++; printf "\r%7d : $pid ", scalar keys %pid; print " Reused\n\n" if $pid == 65992 ## The first pid } for 1 .. 1_000_000;