{
    "mode": "perldoc",
    "parameter": "ftp",
    "section": "-q",
    "url": "https://www.chedong.com/phpMan.php/perldoc/ftp/json",
    "generated": "2026-11-19T07:24:00Z",
    "sections": {
        "Found in /usr/share/perl/5.38/pod/perlfaq8.pod": {
            "content": "Can I use perl to run a telnet or ftp session?\nTry the Net::FTP, TCP::Client, and Net::Telnet modules (available from\nCPAN). <http://www.cpan.org/scripts/netstuff/telnet.emul.shar> will also\nhelp for emulating the telnet protocol, but Net::Telnet is quite\nprobably easier to use.\n\nIf all you want to do is pretend to be telnet but don't need the initial\ntelnet handshaking, then the standard dual-process approach will\nsuffice:\n\nuse IO::Socket;             # new in 5.004\nmy $handle = IO::Socket::INET->new('www.perl.com:80')\nor die \"can't connect to port 80 on www.perl.com $!\";\n$handle->autoflush(1);\nif (fork()) {               # XXX: undef means failure\nselect($handle);\nprint while <STDIN>;    # everything from stdin to socket\n} else {\nprint while <$handle>;  # everything from socket to stdout\n}\nclose $handle;\nexit;\n",
            "subsections": []
        },
        "Found in /usr/share/perl/5.38/pod/perlfaq9.pod": {
            "content": "How do I fetch/put an (S)FTP file?\nNet::FTP, and Net::SFTP allow you to interact with FTP and SFTP (Secure\nFTP) servers.\n",
            "subsections": []
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}