By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,847 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,847 IT Pros & Developers. It's quick & easy.

Ftp query

P: 4
I am using the following code but iam unable to connect to the IP address.

I am unable to understand what is going wrong....

Expand|Select|Wrap|Line Numbers
  1. use Net::FTP;
  2.  
  3. $ftp = Net::FTP->new('192.168.1.86')
  4. or die "Cannot connect to 192.168.1.86: $@";
  5.  
  6. $ftp->login("santoshc",'sanju123')
  7. or die "Cannot login ", $ftp->conncted;
  8.  
  9. $ftp->cwd("D:\Eperl")
  10. or die "Cannot change working directory ", $ftp->message;
  11.  
  12. $ftp->get("first.rtf")
  13. or die "get failed ", $ftp->no file found;
  14.  
  15. $ftp->quit;
Mar 28 '08 #1
Share this Question
Share on Google+
2 Replies


nithinpes
Expert 100+
P: 410
What is the error message that you are getting?
Mar 31 '08 #2

P: 4
Thank you for your reply..

I am getting following :

C:\Documents and Settings\santoshc\Desktop\perl>perl ftp.pl
Cannot connect to 192.168.1.86: Net::FTP: Timeout at ftp.pl line 3.
Apr 1 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.