Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: POE Examples

by sundialsvc4 (Abbot)
on Jul 14, 2014 at 13:12 UTC ( [id://1093544]=note: print w/replies, xml ) Need Help??


in reply to POE Examples

... and if you are on Unix/Linux, you can do something with:
ls -1 dirname | xargs -Pnprocs

... in order to run one Perl program that, say, writes its output to a named pipe (mkfifo).   (xargs takes care of all the parallelism.)   Meanwhile, another process cats the input from that pipe (from whatever source) to the specified target file.   Alternatively, if you have good file-locking, the Perl program briefly locks the target file before writing to it.

In this way, “the Unix way,” you use the existing facilities of the Shell to do complicated things using simple individual programs that each do only one thing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-03-19 08:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found