CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Failed to write remote

 



lsy
Novice

Dec 1, 2013, 7:00 PM

Post #1 of 1 (715 views)
Failed to write remote Can't Post

i would like to write file at remote site. i trying to use File::Remote which copy from http://search.cpan.org/~nwiger/File-Remote-1.17/Remote.pm#open(HANDLE,_file)_;_close(HANDLE)
but somehow i can touch but not write.
below my code


Code
use FindBin qw($Bin); 
use lib "$Bin";

use File::Remote;

my $remote = File::Remote->new(rsh => '/usr/bin/ssh',
rcp => '/usr/bin/scp',
tmp => '/var/run');
$remote->open(FILE, ">>hostname:/localdisk/test.log") or die $!;
print FILE "testing .\n";
$remote->close(FILE);


thanks in advance.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives