Dan Anderson wrote:
> On Tue, 2003-12-09 at 16:31, James Edward Gray II wrote:
> > On Dec 9, 2003, at 3:19 PM, Dan Anderson wrote:
> > 
> > > I have 2 Linux boxes I want to talk to each other over the local
> > > network using a Perl script.  Is it possible to set up a
> > > bidirectional pipe so that 2 perl daemons can communicate with
> > > each other?  How would I go about doing this and are there any
> > > modules to help? 

You're talking about a TCP connection, which is bidirectional.

> > 
> > It's very possible and there are many modules to help. Help us help
> > you though, what are you trying to do?  It could make a big
> > difference. 
> 
> I'm writing a perl daemon to do two things: back up important files on
> multiple boxen so if one gets taken out another will survive, and sync
> files in users directory from a main server -- i.e. I want to
> be able to
> do something like $ ./distribute.pl --file and have it sent to all
> boxen's ~/distributed/ directory.

You might look at the standard rdist(1) utility for this kind of thing.

For crafting network daemons in Perl, Net::Daemon is a good place to start,
IMO.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to