<body> Hi monks,
I have some perl code that I use to ftp files from our mainfarme but
when I try to use the same code to connect to a windows ftp server it won't
connect.  The server address is good I've connected to it using my
mainframe ftp program.
Any ideas?

Perl code
open(FTP_WORK, ">@FTP_cmnd_file"); $oldHandle = select(FTP_WORK); print("open windows.ftp.server \n"); print("my\\userid \n"); print("password \n"); print("cd '/download' \n"); print("get '$downfile' $ftpFile \n"); print("bye \n"); close(FTP_WORK); $_ = `ftp -s:@FTP_cmnd_file > @FTP_log_file`;

I also tried this code I got from your site, It didn't work ether.


$ftp = Net::FTP->new( $server, Passive => 1, Debug => 0 ) or die $@;
messages retruned.
ftp> ftp> open window.ftp.server Invalid command.

thanks. </body>

In reply to $ftp not connecting to server by IronCore

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.