ungalnanban has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the Net::FTP for get the remote hosting file. I want to read the file. I don't want to get the file from remote host to my host (local host) I need to read the file content only,is there any module to do this.
In the above sample program I get the file from 192.168.8.20 then I will read the file and do the operation, I don't want to place the file in my local system. I need to read the "Testing.txt" file content.use strict; use warnings; use Data::Dumper; use Net::FTP; my $ftp = Net::FTP->new("192.168.8.20",Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("root",'root123') or die "Cannot login ", $ftp->message; $ftp->cwd("SUGUMAR") or die "Cannot change working directory ", $ftp->message; $ftp->get("Testing.txt") or die "get failed ", $ftp->message; $ftp->quit;
Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to read the network file.
by nagalenoj (Friar) on May 13, 2010 at 05:28 UTC | |
Re: How to read the network file.
by marto (Cardinal) on May 13, 2010 at 06:20 UTC |
Back to
Seekers of Perl Wisdom