see embedded lines
Satya Devarakonda wrote:
I am sorry. This is how I used the FTP related code. But when "server"
refuses connection it doesn't die.
use Net::FTP;
eval {
my $ftp ="\0";
No need my $ftp is enough;
$ftp = Net::FTP->new( "server" , Debug => 0);
catch the error here U could write something like
unless($ftp){
# Do something
exit 1;
}
$ftp->login("ftp1","pass");
$ftp->login("ftp1","pass") || die "Login failed";
Simlarly put an '|| die ' line after every statement
$ftp->cwd("//dir1/datatrend/test");
$ftp->put("clmgxstime.txt");
$ftp->put("clmsubmdata.txt");
$ftp->put("clmloadstats.txt");
$ftp->quit;
} || die "Could not FTP to Server";
Thank you,
Satya Devarakonda
IS - EDI
Tufts Health Plan
Tel: 617-923-5587 X 3413
Fax: 617-923-5555
"Ramprasad A
Padmanabhan" To: [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc:
core.co.in> Subject: Re: Errors during FTP
11/26/2002 01:38
AM
Learn how to use a newsgroup better, A vague question like this can
lead nowhere.
What are you using for FTP ?, and on what OS ? , Personally I use Net::FTP
If you go thru the docs you can get enough light on trapping errors
( No offence intended )
Best of Luck
Satya Devarakonda wrote:
Hi,
How do we trap errors during FTP? Can somebody throw some light on this
Thank you,
Satya Devarakonda
IS - EDI
Tufts Health Plan
Tel: 617-923-5587 X 3413
Fax: 617-923-5555
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]