Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://904985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-03-30 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found