Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: How to pass array as a reference from one perl file to other

by romy_mathew (Beadle)
on May 15, 2011 at 19:52 UTC ( #904985=note: print w/replies, xml ) Need Help??


in reply to Re: How to pass array as a reference from one perl file to other
in thread How to pass array as a reference from one perl file to other

okke The use of moudle worked....but still a curious to know how to transfer data to and from two files in perl via pipes or other mehtod. I am confused on below text book e.g.

use IO::Handle;

pipe(READFROMCHILD.WRITEFROMCHILD);

pipe(READFROMPARENT,WRITETOCHILD);

WRITETOPARENT->autoflush(1);

if ($pid ==fork) {

close(READFROMPARENT);

close(WRITETOPARENT);

print WRITETOCHILD "parent says hi\n";

$data = <READFROMCHILD>;

close READFROMCHILD;

close WRITETOCHILD;

waitpid(-1,0); }

  • Comment on Re^2: How to pass array as a reference from one perl file to other

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://904985]
help
Chatterbox?
[LanX]: I told you the story about the “new" currency trading system of Dresdner Bank
[LanX]: ?
[Corion]: No, or I don't remember the story ;)
LanX my favourite don't tell me the proof of concept is good enough for production anecdote
[ambrus]: ah, it's one of thos
[Eily]: what, there's a difference between proof of concept and production?
[LanX]: 20 years ago traders were complaining about the latency of the trading system...
[ambrus]: I'm currently in the process of rewriting my proof of concept programs. They sort of developped organically as I was experimenting, so now I've got an ugly mess of multiple programs and one-liners held together by nothing. I'll have to rewrite them to som

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2017-03-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (349 votes). Check out past polls.