I have a script called bho.pl. I am doing this on a
Windows NT platform and I must get a file on a Unix
Platform.

The snippet is below.


#!/perl/bin require Exporter; use lib ("/perl/lib/Net"); use Net::FTP; $ftp = Net::FTP->new("droid.fit.qut.edu.au", Passive => True) or die "Can't open connect: $@\n"; $ftp->login("n2212811","asturias7") or die "Can't login: $@\ +n"; $ftp->cwd(); $ftp->cwd("/n2212811/public_html/scripts") or die "Can't open connec +t: $@\n"; $ftp->get("exp.txt"); $ftp->quit;
The error messages are strange.
First I received this:

C:\webmaster\public_html\cgi-bin>perl bho.pl

Can't login:

Then I fixed this problem by fixinf up my login
Password and I re-ran the script.
Then I got this error
Message:

C:\webmaster\public_html\cgi-bin>perl bho.pl

Can't open connect:


Please tell me, does the problem lie
In the fact that it can't
Find the hostname?


This is the first time I am doing Net::FTP in perl...
If you have a portion of code that works, instead of me
Having to import the Net::FTP library,
It would be just as easily
Appreciated...

...just enough to get the job done
As simply as possible.
Thanks.

Warmest Regards,

Isaac
Pereira


In reply to I Need to Use Net::FTP but its not working? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.