Libnet 1.0605: Need server-response codes from Net::FTP 
Author Message
 Libnet 1.0605: Need server-response codes from Net::FTP

I'm using the FTP.pm module in Libnet 1.0605. It's working fine, but I
would like get more detailed information about the server's repsonse.
Consider:

 (($ftp->put("$localpath", "$targetfilename")) eq $targetfilename)

When this statement resolves to false, I know there's been an error. I
can then rerun the script with the debugging on. The debug listing will
clearly show the cause of the error, for example, the STOR command
resulted in a "553 ...Permision denied" error.

I can't seem to find a way to programmatically fetch the last result
code/msg from the server. Has anyone succeeded in this?

--Greg Smith



Sat, 11 Nov 2000 03:00:00 GMT  
 Libnet 1.0605: Need server-response codes from Net::FTP

[posted and mailed]

On Tue, 26 May 1998 09:39:20 -0700, "Gregory S. Smith"

Quote:

>I'm using the FTP.pm module in Libnet 1.0605. It's working fine, but I
>would like get more detailed information about the server's repsonse.
>Consider:
> (($ftp->put("$localpath", "$targetfilename")) eq $targetfilename)
>When this statement resolves to false, I know there's been an error. I
>can then rerun the script with the debugging on. The debug listing will
>clearly show the cause of the error, for example, the STOR command
>resulted in a "553 ...Permision denied" error.

Net::FTP inherits the methods from Net::Cmd, which includes a method called
message().

Check $ftp->message after a failure, and you'll find exactly what you're
looking for.

Quote:
>I can't seem to find a way to programmatically fetch the last result
>code/msg from the server. Has anyone succeeded in this?

>--Greg Smith


--
                               Jeffrey R. Drumm, Systems Integration Specialist
                       Maine Medical Center - Medical Information Systems Group

"Broken? Hell no! Uniquely implemented!" - me


Sat, 11 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Net::FTP and server response strings

2. libnet/Net::FTP-- accessing FTP within an intranet...

3. libnet/Net::FTP-- accessing FTP within an intranet...

4. How to get server return codes with Net::FTP

5. libnet's Net::FTP fails to connect

6. Is Net::FTP (libnet-1.0605) threadsafe?

7. Is Net::FTP (libnet-1.0605) threadsafe?

8. Need Help: libnet-1.0703 Net::SMTP tests fail

9. NET::FTP example code please?

10. How reliable are Net::FTP status codes?

11. Writting perl code to talk to ftp servers

12. Net::FTP to SunOS Server: Timeout Problems

 

 
Powered by phpBB® Forum Software