in reply to Threads question

You need to wait for all of your threads to join up with the parent:
use threads; # Create 5 threads: threads->create(sub { print "Hello from # $_[0]\n" }, $_ ) for 1...5; # Then when you want to just let your threads work: $_->join foreach threads->list; # Now the threads are done: print "threads are all done!";