Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Simultaneous system() calls

by BrowserUk (Patriarch)
on Feb 18, 2004 at 12:57 UTC ( [id://329897]=note: print w/replies, xml ) Need Help??


in reply to Simultaneous system() calls

This is very easy to do using threads.

#! perl -slw use strict; use threads; my( @t, @r ); push @t, async { `dir /s c:` }; push @t, async { `dir /s d:` }; push @t, async { `dir /s p:` }; print "doing other stuff..." for 1 .. 10; # get and print the results. push @r, $_->join for @t; print for @r;

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://329897]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 07:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found