Perl: the Markov chain saw | |
PerlMonks |
Re^4: Using MCE to write to multiple files.by marioroy (Prior) |
on Dec 13, 2014 at 01:42 UTC ( [id://1110232]=note: print w/replies, xml ) | Need Help?? |
Hi etheleon,
It seems that output order is not necessary for the use-case. The issue mentioned may be coming from say $output (not appending \n to the file for me, instead getting a GLOB message to STDOUT). Btw, I ran your code and it ran fine. I only changed say $output to print $output "\n"; All files had 10 results -- all identical -- all same size. Back to MCE, the following processes @input_data in parallel. Am using the MCE::Loop Model versus using the Core API.
Notice how mce_loop wraps around the serial code to enable parallelism. Also see https://metacpan.org/pod/MCE::Loop#GATHERING-DATA if wanting to gather data back to the Manager process.
In Section
Seekers of Perl Wisdom
|
|