Ftp query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shyamsunderc
    New Member
    • Mar 2008
    • 4

    #1

    Ftp query

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

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

    [CODE=perl]use Net::FTP;

    $ftp = Net::FTP->new('192.168.1 .86')
    or die "Cannot connect to 192.168.1.86: $@";

    $ftp->login("santosh c",'sanju123 ')
    or die "Cannot login ", $ftp->conncted;

    $ftp->cwd("D:\Eperl" )
    or die "Cannot change working directory ", $ftp->message;

    $ftp->get("first.rtf ")
    or die "get failed ", $ftp->no file found;

    $ftp->quit;[/CODE]
    Last edited by eWish; Mar 31 '08, 05:37 AM. Reason: Please use code tags
  • nithinpes
    Recognized Expert Contributor
    • Dec 2007
    • 410

    #2
    What is the error message that you are getting?

    Comment

    • shyamsunderc
      New Member
      • Mar 2008
      • 4

      #3
      Thank you for your reply..

      I am getting following :

      C:\Documents and Settings\santos hc\Desktop\perl >perl ftp.pl
      Cannot connect to 192.168.1.86: Net::FTP: Timeout at ftp.pl line 3.

      Comment

      Working...