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!";
In reply to Re: Threads question
by jdrago_999
in thread Threads question
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |