Send Data to Another File.

Z

ZYP

Hi,

I'm new here and actually I don't understand perl much.
My problem is how to send data to another perl file.

- The sender is perl too. It contain data in Hash and some Parameter.
- The receiver is perl. And It need to collect both of Hash and
Parameter from the sender.

Can someone guide me for perl script how to send/receive with perl
while the data is in Hash and some Parameter.

Thank you very much.
ZYP
 
R

RedGrittyBrick

ZYP said:
My problem is how to send data to another perl file.

You might want to send data to another running Perl program.

- The sender is perl too. It contain data in Hash and some Parameter.
- The receiver is perl. And It need to collect both of Hash and
Parameter from the sender.

Can someone guide me for perl script how to send/receive with perl
while the data is in Hash and some Parameter.

There must be many ways. One way would be to use SOAP::Lite.

If the two perl scripts are not running concurrently and separately then
you might consider simply making modules of one that can be used by
the other.

perldoc perlipc

search.cpan.org will find you solutions such as Data::Serializer
 
J

Jürgen Exner

ZYP said:
I'm new here and actually I don't understand perl much.
My problem is how to send data to another perl file.

To send data to a file you simply open() that file and then print() to
the file handle that is associated with that file. There are several
different options which allow you to write from the beginning, append,
position the write pointer, read/write etc. .
- The sender is perl too. It contain data in Hash and some Parameter.
- The receiver is perl. And It need to collect both of Hash and
Parameter from the sender.

Let me guess: you are not talking about writing data to a file but about
transmitting data between two Perl programs, i.e. two Perl processes?
Can someone guide me for perl script how to send/receive with perl
while the data is in Hash and some Parameter.

There are numerous options. On CPAN you can find modules for pretty much
any common IPC (Inter Process Communication) method that has ever been
invented.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top