There are many ways, ranging from easy to hard.
I would go and research the possibilities in the order as I presented them, but if you're really desperate, look at my netcat-style file pipes (sender and receiver) below:
The sender (called nc for hysterical raisins):
#!/usr/bin/perl -w use strict; use IO::Socket; select(IO::Socket::INET->new(PeerAddr => shift, PeerPort => shift) or die "Couldn't connect: $!"); print for <>;
The receiver (called cn for reasons obvious):
#!/usr/bin/perl -w use strict; use IO::Socket; # reverse netcat my $s = IO::Socket::INET->new(LocalAddr => 'sfsifc53', LocalPort => 6666, Listen => 1) or die "Couldn't connect: $!"; my $c = $s->accept; print while <$c>;
Most likely, the code above could be vastly simplified by using [cpan://IO::All], but I haven't used that module yet.
Or you can run a web-server on the unix side, and run LWP::Simple on the client side. Anyway, you're too vague. Please answer one or more of the folowing questions:
If you want to get the file off your unix machine from another machine, either install an FTP server on the unix machine and download it using Net::FTP or LWP, install a web-server and download using LWP, or - if you want to have encrypted connections, install an SSH server and use an SSH client library - or do system("scp user@remote:/file/path /local/path") if you have ssh and scp installed locally. Personally I like the ssh client programs from http://www.cygwin.com. If you want to run ssh without having to enter the password each time, you can set up public key authentication .
mount -t smbfs -o username=Roger,password=Blah //luke/inbox /mnt/inbox
perlmonks.org content © perlmonks.org and Corion, jakie, Joost, Roger
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03