Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: best way to pass data

by ehdonhon (Curate)
on Aug 21, 2003 at 19:33 UTC ( #285567=note: print w/ replies, xml ) Need Help??


in reply to best way to pass data

Well, if that gets converted to a '/bin/sh -c', it will probably crash if @array really does have thousands of lines in it. There is a hard limit to the number of parameters that sh will take.

Here is one solution:

open( PROG, '| /tmp/scripts.pl' ); for ( @ARRAY ) { print PROG $_; } close( PROG );

If you do it that way, then you will have to write your other script to accept the data via STDIN.

If this is too slow for you, you might want to take a look at IPC::Shareable::SharedMem for a shared memory solution.


Comment on Re: best way to pass data
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (16)
As of 2015-07-07 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (92 votes), past polls