deejay01 has asked for the wisdom of the Perl Monks concerning the following question:

was wondering if anyone has had the occasion to use the quote command within the ftp family. I am trying to put together something to ftp data to the mainframe and submit commands there that the mainframe recognizes

Replies are listed 'Best First'.
Re: use of quote within ftp
by kschwab (Vicar) on Aug 20, 2002 at 16:40 UTC
    Net::FTP can do this, is has a "quot" method to send commands that it doesn't have specific support for:
    use Net::FTP; my $ftp = Net::FTP->new('ftp.rge.com'); $ftp->login('ftp','anon@'); my $okay=$ftp->quot('HELP'); my $code=$ftp->code; my $message=$ftp->message; print "[$okay] [$code] [$message]\n";
    Prints:
    $ perl tester [2] [214] [The following commands are recognized (* =>'s unimplemented +). USER PORT STOR MSAM* RNTO* NLST MKD* CDUP PASS PASV APPE* MRSQ* ABOR SITE XMKD* XCUP ACCT* TYPE MLFL* MRCP* DELE* SYST RMD* STOU* SMNT* STRU MAIL* ALLO* CWD STAT XRMD* SIZE REIN* MODE MSND* REST XCWD HELP PWD MDTM QUIT RETR MSOM* RNFR* LIST NOOP XPWD Direct comments to ftp@rge.com. ]
    Some of the methods come from Net::Cmd, which Net::FTP is derived from. See the docs for both.