CINXE.COM

Net::FTP - FTP Client class - Perldoc Browser

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Net::FTP - FTP Client class - Perldoc Browser</title> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser"> <link rel="canonical" href="https://perldoc.perl.org/Net::FTP"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" /> <style> body { background: #f4f4f5; color: #020202; } .navbar-dark { background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%); background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%); background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0); background-repeat: repeat-x; } .navbar-dark .navbar-nav .nav-link, .navbar-dark .navbar-nav .nav-link:focus { color: #fff } .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 } #wrapperlicious { margin: 0 auto; font: 0.9em 'Helvetica Neue', Helvetica, sans-serif; font-weight: normal; line-height: 1.5em; margin: 0; padding: 0; } #wrapperlicious h1 { font-size: 1.5em } #wrapperlicious h2 { font-size: 1.3em } #wrapperlicious h3 { font-size: 1.1em } #wrapperlicious h4 { font-size: 0.9em } #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3, #wrapperlicious h4, #wrapperlicious dt { color: #020202; margin-top: 1em; margin-bottom: 1em; position: relative; font-weight: bold; } #wrapperlicious a { color: inherit; text-decoration: underline } #wrapperlicious #toc { text-decoration: none } #wrapperlicious a:hover { color: #2a2a2a } #wrapperlicious a img { border: 0 } #wrapperlicious :not(pre) > code { color: inherit; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; font: 0.9em Consolas, Menlo, Monaco, monospace; padding: 0.3em; } #wrapperlicious dd { margin: 0; margin-left: 2em; } #wrapperlicious dt { color: #2a2a2a; font-weight: bold; margin-left: 0.9em; } #wrapperlicious p { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious li > p { margin-bottom: 0; margin-top: 0; } #wrapperlicious pre { border: 1px solid #c1c1c1; border-radius: 3px; font: 100% Consolas, Menlo, Monaco, monospace; margin-bottom: 1em; margin-top: 1em; } #wrapperlicious pre > code { display: block; background-color: #f6f6f6; font: 0.9em Consolas, Menlo, Monaco, monospace; line-height: 1.5em; text-align: left; white-space: pre; padding: 1em; } #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul { margin-bottom: 1em; margin-top: 1em; } #wrapperlicious ul { list-style-type: square; } #wrapperlicious ul ul { margin-bottom: 0px; margin-top: 0px; } #footer { font-size: 0.8em; padding-top: 0.5em; text-align: center; } #more { display: inline; font-size: 0.8em; } #perldocdiv { background-color: #fff; border: 1px solid #c1c1c1; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; margin-left: auto; margin-right: auto; padding: 3em; padding-top: 1em; max-width: 960px; } #moduleversion { float: right } #wrapperlicious .leading-notice { font-style: italic; padding-left: 1em; margin-top: 1em; margin-bottom: 1em; } #wrapperlicious .permalink { display: none; left: -0.75em; position: absolute; padding-right: 0.25em; text-decoration: none; } #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink, #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink, #wrapperlicious dt:hover .permalink { display: block; } </style> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KVNWBNT5FB'); gtag('config', 'UA-50555-3'); </script> </head> <body> <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="/"><img src="/images/perl_camel_30.png" width="30" height="30" class="d-inline-block align-top" alt="Perl Camel Logo"> Perldoc Browser</a> <div class="collapse navbar-collapse" id="navbarNav"> <ul class="navbar-nav mr-auto"> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.10.1</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-stable"> <a class="dropdown-item" href="/Net::FTP">Latest</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1/Net::FTP">5.40.1</a> <a class="dropdown-item" href="/5.40.0/Net::FTP">5.40.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3/Net::FTP">5.38.3</a> <a class="dropdown-item" href="/5.38.2/Net::FTP">5.38.2</a> <a class="dropdown-item" href="/5.38.1/Net::FTP">5.38.1</a> <a class="dropdown-item" href="/5.38.0/Net::FTP">5.38.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.36.3/Net::FTP">5.36.3</a> <a class="dropdown-item" href="/5.36.2/Net::FTP">5.36.2</a> <a class="dropdown-item" href="/5.36.1/Net::FTP">5.36.1</a> <a class="dropdown-item" href="/5.36.0/Net::FTP">5.36.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.34.3/Net::FTP">5.34.3</a> <a class="dropdown-item" href="/5.34.2/Net::FTP">5.34.2</a> <a class="dropdown-item" href="/5.34.1/Net::FTP">5.34.1</a> <a class="dropdown-item" href="/5.34.0/Net::FTP">5.34.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.32.1/Net::FTP">5.32.1</a> <a class="dropdown-item" href="/5.32.0/Net::FTP">5.32.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.30.3/Net::FTP">5.30.3</a> <a class="dropdown-item" href="/5.30.2/Net::FTP">5.30.2</a> <a class="dropdown-item" href="/5.30.1/Net::FTP">5.30.1</a> <a class="dropdown-item" href="/5.30.0/Net::FTP">5.30.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.28.3/Net::FTP">5.28.3</a> <a class="dropdown-item" href="/5.28.2/Net::FTP">5.28.2</a> <a class="dropdown-item" href="/5.28.1/Net::FTP">5.28.1</a> <a class="dropdown-item" href="/5.28.0/Net::FTP">5.28.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.26.3/Net::FTP">5.26.3</a> <a class="dropdown-item" href="/5.26.2/Net::FTP">5.26.2</a> <a class="dropdown-item" href="/5.26.1/Net::FTP">5.26.1</a> <a class="dropdown-item" href="/5.26.0/Net::FTP">5.26.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.24.4/Net::FTP">5.24.4</a> <a class="dropdown-item" href="/5.24.3/Net::FTP">5.24.3</a> <a class="dropdown-item" href="/5.24.2/Net::FTP">5.24.2</a> <a class="dropdown-item" href="/5.24.1/Net::FTP">5.24.1</a> <a class="dropdown-item" href="/5.24.0/Net::FTP">5.24.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.22.4/Net::FTP">5.22.4</a> <a class="dropdown-item" href="/5.22.3/Net::FTP">5.22.3</a> <a class="dropdown-item" href="/5.22.2/Net::FTP">5.22.2</a> <a class="dropdown-item" href="/5.22.1/Net::FTP">5.22.1</a> <a class="dropdown-item" href="/5.22.0/Net::FTP">5.22.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.20.3/Net::FTP">5.20.3</a> <a class="dropdown-item" href="/5.20.2/Net::FTP">5.20.2</a> <a class="dropdown-item" href="/5.20.1/Net::FTP">5.20.1</a> <a class="dropdown-item" href="/5.20.0/Net::FTP">5.20.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.18.4/Net::FTP">5.18.4</a> <a class="dropdown-item" href="/5.18.3/Net::FTP">5.18.3</a> <a class="dropdown-item" href="/5.18.2/Net::FTP">5.18.2</a> <a class="dropdown-item" href="/5.18.1/Net::FTP">5.18.1</a> <a class="dropdown-item" href="/5.18.0/Net::FTP">5.18.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.16.3/Net::FTP">5.16.3</a> <a class="dropdown-item" href="/5.16.2/Net::FTP">5.16.2</a> <a class="dropdown-item" href="/5.16.1/Net::FTP">5.16.1</a> <a class="dropdown-item" href="/5.16.0/Net::FTP">5.16.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.14.4/Net::FTP">5.14.4</a> <a class="dropdown-item" href="/5.14.3/Net::FTP">5.14.3</a> <a class="dropdown-item" href="/5.14.2/Net::FTP">5.14.2</a> <a class="dropdown-item" href="/5.14.1/Net::FTP">5.14.1</a> <a class="dropdown-item" href="/5.14.0/Net::FTP">5.14.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.12.5/Net::FTP">5.12.5</a> <a class="dropdown-item" href="/5.12.4/Net::FTP">5.12.4</a> <a class="dropdown-item" href="/5.12.3/Net::FTP">5.12.3</a> <a class="dropdown-item" href="/5.12.2/Net::FTP">5.12.2</a> <a class="dropdown-item" href="/5.12.1/Net::FTP">5.12.1</a> <a class="dropdown-item" href="/5.12.0/Net::FTP">5.12.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item active" href="/5.10.1/Net::FTP">5.10.1</a> <a class="dropdown-item" href="/5.10.0/Net::FTP">5.10.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.8.9/Net::FTP">5.8.9</a> <a class="dropdown-item" href="/5.8.8/Net::FTP">5.8.8</a> <a class="dropdown-item" href="/5.8.7/Net::FTP">5.8.7</a> <a class="dropdown-item" href="/5.8.6/Net::FTP">5.8.6</a> <a class="dropdown-item" href="/5.8.5/Net::FTP">5.8.5</a> <a class="dropdown-item" href="/5.8.4/Net::FTP">5.8.4</a> <a class="dropdown-item" href="/5.8.3/Net::FTP">5.8.3</a> <a class="dropdown-item" href="/5.8.2/Net::FTP">5.8.2</a> <a class="dropdown-item" href="/5.8.1/Net::FTP">5.8.1</a> <a class="dropdown-item" href="/5.8.0/Net::FTP">5.8.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.6.2/Net::FTP">5.6.2</a> <a class="dropdown-item" href="/5.6.1/Net::FTP">5.6.1</a> <a class="dropdown-item" href="/5.6.0/Net::FTP">5.6.0</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.005_04/Net::FTP">5.005_04</a> <a class="dropdown-item" href="/5.005_03/Net::FTP">5.005_03</a> <a class="dropdown-item" href="/5.005_02/Net::FTP">5.005_02</a> <a class="dropdown-item" href="/5.005_01/Net::FTP">5.005_01</a> <a class="dropdown-item" href="/5.005/Net::FTP">5.005</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-dev"> <a class="dropdown-item" href="/blead/Net::FTP">blead</a> <a class="dropdown-item" href="/5.41.10/Net::FTP">5.41.10</a> <a class="dropdown-item" href="/5.41.9/Net::FTP">5.41.9</a> <a class="dropdown-item" href="/5.41.8/Net::FTP">5.41.8</a> <a class="dropdown-item" href="/5.41.7/Net::FTP">5.41.7</a> <a class="dropdown-item" href="/5.41.6/Net::FTP">5.41.6</a> <a class="dropdown-item" href="/5.41.5/Net::FTP">5.41.5</a> <a class="dropdown-item" href="/5.41.4/Net::FTP">5.41.4</a> <a class="dropdown-item" href="/5.41.3/Net::FTP">5.41.3</a> <a class="dropdown-item" href="/5.41.2/Net::FTP">5.41.2</a> <a class="dropdown-item" href="/5.41.1/Net::FTP">5.41.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.40.1-RC1/Net::FTP">5.40.1-RC1</a> <a class="dropdown-item" href="/5.40.0-RC2/Net::FTP">5.40.0-RC2</a> <a class="dropdown-item" href="/5.40.0-RC1/Net::FTP">5.40.0-RC1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.39.10/Net::FTP">5.39.10</a> <a class="dropdown-item" href="/5.39.9/Net::FTP">5.39.9</a> <a class="dropdown-item" href="/5.39.8/Net::FTP">5.39.8</a> <a class="dropdown-item" href="/5.39.7/Net::FTP">5.39.7</a> <a class="dropdown-item" href="/5.39.6/Net::FTP">5.39.6</a> <a class="dropdown-item" href="/5.39.5/Net::FTP">5.39.5</a> <a class="dropdown-item" href="/5.39.4/Net::FTP">5.39.4</a> <a class="dropdown-item" href="/5.39.3/Net::FTP">5.39.3</a> <a class="dropdown-item" href="/5.39.2/Net::FTP">5.39.2</a> <a class="dropdown-item" href="/5.39.1/Net::FTP">5.39.1</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.38.3-RC1/Net::FTP">5.38.3-RC1</a> </div> </li> <li class="nav-item dropdown text-nowrap"> <a class="nav-link dropdown-toggle" href="#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a> <div class="dropdown-menu" aria-labelledby="dropdownlink-nav"> <a class="dropdown-item" href="/5.10.1/perl">Perl</a> <a class="dropdown-item" href="/5.10.1/perlintro">Intro</a> <a class="dropdown-item" href="/5.10.1/perl#Tutorials">Tutorials</a> <a class="dropdown-item" href="/5.10.1/perlfaq">FAQs</a> <a class="dropdown-item" href="/5.10.1/perl#Reference-Manual">Reference</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/perlop">Operators</a> <a class="dropdown-item" href="/5.10.1/functions">Functions</a> <a class="dropdown-item" href="/5.10.1/variables">Variables</a> <a class="dropdown-item" href="/5.10.1/modules">Modules</a> <a class="dropdown-item" href="/5.10.1/perlutil">Utilities</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="/5.10.1/perldelta">Release Notes</a> <a class="dropdown-item" href="/5.10.1/perlcommunity">Community</a> <a class="dropdown-item" href="/5.10.1/perlhist">History</a> </div> </li> </ul> <ul class="navbar-nav"> <script> function set_expand (expand) { var perldocdiv = document.getElementById('perldocdiv'); var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width'); var expanded = (width == '' || width == 'none') ? true : false; if (expand === null) { expand = !expanded; } if ((expand && !expanded) || (!expand && expanded)) { perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px'); var button_classlist = document.getElementById('content-expand-button').classList; if (expand) { button_classlist.add('btn-light'); button_classlist.remove('btn-outline-light'); } else { button_classlist.add('btn-outline-light'); button_classlist.remove('btn-light'); } } return expand; } function toggle_expand () { var expand = set_expand(null); document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC'; } function read_expand () { return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', function () { if (read_expand()) { set_expand(true); } }); } else if (read_expand()) { set_expand(true); } </script> <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-4" onclick="toggle_expand()">Expand</button> </ul> <form class="form-inline" method="get" action="/5.10.1/search"> <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search" value=""> </form> </div> </nav> <div id="wrapperlicious" class="container-fluid"> <div id="perldocdiv"> <div id="links"> <a href="/5.10.1/Net::FTP">Net::FTP</a> <div id="more"> (<a href="/5.10.1/Net::FTP.txt">source</a>, <a href="https://metacpan.org/pod/Net::FTP">CPAN</a>) </div> <div id="moduleversion">version 2.77</div> </div> <div class="leading-notice"> You are viewing the version of this documentation from Perl 5.10.1. <a href="/Net::FTP">View the latest version</a> </div> <h1><a id="toc">CONTENTS</a></h1> <ul> <li> <a class="text-decoration-none" href="#NAME">NAME</a> </li> <li> <a class="text-decoration-none" href="#SYNOPSIS">SYNOPSIS</a> </li> <li> <a class="text-decoration-none" href="#DESCRIPTION">DESCRIPTION</a> </li> <li> <a class="text-decoration-none" href="#OVERVIEW">OVERVIEW</a> </li> <li> <a class="text-decoration-none" href="#CONSTRUCTOR">CONSTRUCTOR</a> </li> <li> <a class="text-decoration-none" href="#METHODS">METHODS</a> <ul> <li> <a class="text-decoration-none" href="#Methods-for-the-adventurous">Methods for the adventurous</a> </li> </ul> </li> <li> <a class="text-decoration-none" href="#THE-dataconn-CLASS">THE dataconn CLASS</a> </li> <li> <a class="text-decoration-none" href="#UNIMPLEMENTED">UNIMPLEMENTED</a> </li> <li> <a class="text-decoration-none" href="#REPORTING-BUGS">REPORTING BUGS</a> </li> <li> <a class="text-decoration-none" href="#AUTHOR">AUTHOR</a> </li> <li> <a class="text-decoration-none" href="#SEE-ALSO">SEE ALSO</a> </li> <li> <a class="text-decoration-none" href="#USE-EXAMPLES">USE EXAMPLES</a> </li> <li> <a class="text-decoration-none" href="#CREDITS">CREDITS</a> </li> <li> <a class="text-decoration-none" href="#COPYRIGHT">COPYRIGHT</a> </li> </ul> <h1 id="NAME"><a class="permalink" href="#NAME">#</a>NAME</h1> <p>Net::FTP - FTP Client class</p> <h1 id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">#</a>SYNOPSIS</h1> <pre><code>use Net::FTP; $ftp = Net::FTP-&gt;new(&quot;some.host.name&quot;, Debug =&gt; 0) or die &quot;Cannot connect to some.host.name: $@&quot;; $ftp-&gt;login(&quot;anonymous&quot;,&#39;-anonymous@&#39;) or die &quot;Cannot login &quot;, $ftp-&gt;message; $ftp-&gt;cwd(&quot;/pub&quot;) or die &quot;Cannot change working directory &quot;, $ftp-&gt;message; $ftp-&gt;get(&quot;that.file&quot;) or die &quot;get failed &quot;, $ftp-&gt;message; $ftp-&gt;quit;</code></pre> <h1 id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">#</a>DESCRIPTION</h1> <p><code>Net::FTP</code> is a class implementing a simple FTP client in Perl as described in RFC959. It provides wrappers for a subset of the RFC959 commands.</p> <h1 id="OVERVIEW"><a class="permalink" href="#OVERVIEW">#</a>OVERVIEW</h1> <p>FTP stands for File Transfer Protocol. It is a way of transferring files between networked machines. The protocol defines a client (whose commands are provided by this module) and a server (not implemented in this module). Communication is always initiated by the client, and the server responds with a message and a status code (and sometimes with data).</p> <p>The FTP protocol allows files to be sent to or fetched from the server. Each transfer involves a <b>local file</b> (on the client) and a <b>remote file</b> (on the server). In this module, the same file name will be used for both local and remote if only one is specified. This means that transferring remote file <code>/path/to/file</code> will try to put that file in <code>/path/to/file</code> locally, unless you specify a local file name.</p> <p>The protocol also defines several standard <b>translations</b> which the file can undergo during transfer. These are ASCII, EBCDIC, binary, and byte. ASCII is the default type, and indicates that the sender of files will translate the ends of lines to a standard representation which the receiver will then translate back into their local representation. EBCDIC indicates the file being transferred is in EBCDIC format. Binary (also known as image) format sends the data as a contiguous bit stream. Byte format transfers the data as bytes, the values of which remain the same regardless of differences in byte size between the two machines (in theory - in practice you should only use this if you really know what you&#39;re doing).</p> <h1 id="CONSTRUCTOR"><a class="permalink" href="#CONSTRUCTOR">#</a>CONSTRUCTOR</h1> <dl> <dt id="new-([-HOST-]-[,-OPTIONS-])"><a class="permalink" href="#new-(%5B-HOST-%5D-%5B,-OPTIONS-%5D)">#</a><a id="new"></a><a id="new-HOST-OPTIONS"></a>new ([ HOST ] [, OPTIONS ])</dt> <dd> <p>This is the constructor for a new Net::FTP object. <code>HOST</code> is the name of the remote host to which an FTP connection is required.</p> <p><code>HOST</code> is optional. If <code>HOST</code> is not given then it may instead be passed as the <code>Host</code> option described below.</p> <p><code>OPTIONS</code> are passed in a hash like fashion, using key and value pairs. Possible options are:</p> <p><b>Host</b> - FTP host to connect to. It may be a single scalar, as defined for the <code>PeerAddr</code> option in <a href="/5.10.1/IO::Socket::INET">IO::Socket::INET</a>, or a reference to an array with hosts to try in turn. The <a href="#host">&quot;host&quot;</a> method will return the value which was used to connect to the host.</p> <p><b>Firewall</b> - The name of a machine which acts as an FTP firewall. This can be overridden by an environment variable <code>FTP_FIREWALL</code>. If specified, and the given host cannot be directly connected to, then the connection is made to the firewall machine and the string <code>@hostname</code> is appended to the login identifier. This kind of setup is also referred to as an ftp proxy.</p> <p><b>FirewallType</b> - The type of firewall running on the machine indicated by <b>Firewall</b>. This can be overridden by an environment variable <code>FTP_FIREWALL_TYPE</code>. For a list of permissible types, see the description of ftp_firewall_type in <a href="/5.10.1/Net::Config">Net::Config</a>.</p> <p><b>BlockSize</b> - This is the block size that Net::FTP will use when doing transfers. (defaults to 10240)</p> <p><b>Port</b> - The port number to connect to on the remote machine for the FTP connection</p> <p><b>Timeout</b> - Set a timeout value (defaults to 120)</p> <p><b>Debug</b> - debug level (see the debug method in <a href="/5.10.1/Net::Cmd">Net::Cmd</a>)</p> <p><b>Passive</b> - If set to a non-zero value then all data transfers will be done using passive mode. If set to zero then data transfers will be done using active mode. If the machine is connected to the Internet directly, both passive and active mode should work equally well. Behind most firewall and NAT configurations passive mode has a better chance of working. However, in some rare firewall configurations, active mode actually works when passive mode doesn&#39;t. Some really old FTP servers might not implement passive transfers. If not specified, then the transfer mode is set by the environment variable <code>FTP_PASSIVE</code> or if that one is not set by the settings done by the <i>libnetcfg</i> utility. If none of these apply then passive mode is used.</p> <p><b>Hash</b> - If given a reference to a file handle (e.g., <code>\*STDERR</code>), print hash marks (#) on that filehandle every 1024 bytes. This simply invokes the <code>hash()</code> method for you, so that hash marks are displayed for all transfers. You can, of course, call <code>hash()</code> explicitly whenever you&#39;d like.</p> <p><b>LocalAddr</b> - Local address to use for all socket connections, this argument will be passed to <a href="/5.10.1/IO::Socket::INET">IO::Socket::INET</a></p> <p>If the constructor fails undef will be returned and an error message will be in $@</p> </dd> </dl> <h1 id="METHODS"><a class="permalink" href="#METHODS">#</a>METHODS</h1> <p>Unless otherwise stated all methods return either a <i>true</i> or <i>false</i> value, with <i>true</i> meaning that the operation was a success. When a method states that it returns a value, failure will be returned as <i>undef</i> or an empty list.</p> <dl> <dt id="login-([LOGIN-[,PASSWORD-[,-ACCOUNT]-]-])"><a class="permalink" href="#login-(%5BLOGIN-%5B,PASSWORD-%5B,-ACCOUNT%5D-%5D-%5D)">#</a><a id="login"></a><a id="login-LOGIN-PASSWORD-ACCOUNT"></a>login ([LOGIN [,PASSWORD [, ACCOUNT] ] ])</dt> <dd> <p>Log into the remote FTP server with the given login information. If no arguments are given then the <code>Net::FTP</code> uses the <code>Net::Netrc</code> package to lookup the login information for the connected host. If no information is found then a login of <i>anonymous</i> is used. If no password is given and the login is <i>anonymous</i> then <i>anonymous@</i> will be used for password.</p> <p>If the connection is via a firewall then the <code>authorize</code> method will be called with no arguments.</p> </dd> <dt id="authorize-(-[AUTH-[,-RESP]])"><a class="permalink" href="#authorize-(-%5BAUTH-%5B,-RESP%5D%5D)">#</a><a id="authorize"></a><a id="authorize-AUTH-RESP"></a>authorize ( [AUTH [, RESP]])</dt> <dd> <p>This is a protocol used by some firewall ftp proxies. It is used to authorise the user to send data out. If both arguments are not specified then <code>authorize</code> uses <code>Net::Netrc</code> to do a lookup.</p> </dd> <dt id="site-(ARGS)"><a class="permalink" href="#site-(ARGS)">#</a><a id="site"></a><a id="site-ARGS"></a>site (ARGS)</dt> <dd> <p>Send a SITE command to the remote server and wait for a response.</p> <p>Returns most significant digit of the response code.</p> </dd> <dt id="ascii"><a class="permalink" href="#ascii">#</a>ascii</dt> <dd> <p>Transfer file in ASCII. CRLF translation will be done if required</p> </dd> <dt id="binary"><a class="permalink" href="#binary">#</a>binary</dt> <dd> <p>Transfer file in binary mode. No transformation will be done.</p> <p><b>Hint</b>: If both server and client machines use the same line ending for text files, then it will be faster to transfer all files in binary mode.</p> </dd> <dt id="rename-(-OLDNAME,-NEWNAME-)"><a class="permalink" href="#rename-(-OLDNAME,-NEWNAME-)">#</a><a id="rename"></a><a id="rename-OLDNAME-NEWNAME"></a>rename ( OLDNAME, NEWNAME )</dt> <dd> <p>Rename a file on the remote FTP server from <code>OLDNAME</code> to <code>NEWNAME</code>. This is done by sending the RNFR and RNTO commands.</p> </dd> <dt id="delete-(-FILENAME-)"><a class="permalink" href="#delete-(-FILENAME-)">#</a><a id="delete"></a><a id="delete-FILENAME"></a>delete ( FILENAME )</dt> <dd> <p>Send a request to the server to delete <code>FILENAME</code>.</p> </dd> <dt id="cwd-(-[-DIR-]-)"><a class="permalink" href="#cwd-(-%5B-DIR-%5D-)">#</a><a id="cwd"></a><a id="cwd-DIR"></a>cwd ( [ DIR ] )</dt> <dd> <p>Attempt to change directory to the directory given in <code>$dir</code>. If <code>$dir</code> is <code>&quot;..&quot;</code>, the FTP <code>CDUP</code> command is used to attempt to move up one directory. If no directory is given then an attempt is made to change the directory to the root directory.</p> </dd> <dt id="cdup-()"><a class="permalink" href="#cdup-()">#</a><a id="cdup"></a>cdup ()</dt> <dd> <p>Change directory to the parent of the current directory.</p> </dd> <dt id="pwd-()"><a class="permalink" href="#pwd-()">#</a><a id="pwd"></a>pwd ()</dt> <dd> <p>Returns the full pathname of the current directory.</p> </dd> <dt id="restart-(-WHERE-)"><a class="permalink" href="#restart-(-WHERE-)">#</a><a id="restart"></a><a id="restart-WHERE"></a>restart ( WHERE )</dt> <dd> <p>Set the byte offset at which to begin the next data transfer. Net::FTP simply records this value and uses it when during the next data transfer. For this reason this method will not return an error, but setting it may cause a subsequent data transfer to fail.</p> </dd> <dt id="rmdir-(-DIR-[,-RECURSE-])"><a class="permalink" href="#rmdir-(-DIR-%5B,-RECURSE-%5D)">#</a><a id="rmdir"></a><a id="rmdir-DIR-RECURSE"></a>rmdir ( DIR [, RECURSE ])</dt> <dd> <p>Remove the directory with the name <code>DIR</code>. If <code>RECURSE</code> is <i>true</i> then <code>rmdir</code> will attempt to delete everything inside the directory.</p> </dd> <dt id="mkdir-(-DIR-[,-RECURSE-])"><a class="permalink" href="#mkdir-(-DIR-%5B,-RECURSE-%5D)">#</a><a id="mkdir"></a><a id="mkdir-DIR-RECURSE"></a>mkdir ( DIR [, RECURSE ])</dt> <dd> <p>Create a new directory with the name <code>DIR</code>. If <code>RECURSE</code> is <i>true</i> then <code>mkdir</code> will attempt to create all the directories in the given path.</p> <p>Returns the full pathname to the new directory.</p> </dd> <dt id="alloc-(-SIZE-[,-RECORD_SIZE]-)"><a class="permalink" href="#alloc-(-SIZE-%5B,-RECORD_SIZE%5D-)">#</a><a id="alloc"></a><a id="alloc-SIZE-RECORD_SIZE"></a>alloc ( SIZE [, RECORD_SIZE] )</dt> <dd> <p>The alloc command allows you to give the ftp server a hint about the size of the file about to be transferred using the ALLO ftp command. Some storage systems use this to make intelligent decisions about how to store the file. The <code>SIZE</code> argument represents the size of the file in bytes. The <code>RECORD_SIZE</code> argument indicates a maximum record or page size for files sent with a record or page structure.</p> <p>The size of the file will be determined, and sent to the server automatically for normal files so that this method need only be called if you are transferring data from a socket, named pipe, or other stream not associated with a normal file.</p> </dd> <dt id="ls-(-[-DIR-]-)"><a class="permalink" href="#ls-(-%5B-DIR-%5D-)">#</a><a id="ls"></a><a id="ls-DIR"></a>ls ( [ DIR ] )</dt> <dd> <p>Get a directory listing of <code>DIR</code>, or the current directory.</p> <p>In an array context, returns a list of lines returned from the server. In a scalar context, returns a reference to a list.</p> </dd> <dt id="dir-(-[-DIR-]-)"><a class="permalink" href="#dir-(-%5B-DIR-%5D-)">#</a><a id="dir"></a><a id="dir-DIR"></a>dir ( [ DIR ] )</dt> <dd> <p>Get a directory listing of <code>DIR</code>, or the current directory in long format.</p> <p>In an array context, returns a list of lines returned from the server. In a scalar context, returns a reference to a list.</p> </dd> <dt id="get-(-REMOTE_FILE-[,-LOCAL_FILE-[,-WHERE]]-)"><a class="permalink" href="#get-(-REMOTE_FILE-%5B,-LOCAL_FILE-%5B,-WHERE%5D%5D-)">#</a><a id="get"></a><a id="get-REMOTE_FILE-LOCAL_FILE-WHERE"></a>get ( REMOTE_FILE [, LOCAL_FILE [, WHERE]] )</dt> <dd> <p>Get <code>REMOTE_FILE</code> from the server and store locally. <code>LOCAL_FILE</code> may be a filename or a filehandle. If not specified, the file will be stored in the current directory with the same leafname as the remote file.</p> <p>If <code>WHERE</code> is given then the first <code>WHERE</code> bytes of the file will not be transferred, and the remaining bytes will be appended to the local file if it already exists.</p> <p>Returns <code>LOCAL_FILE</code>, or the generated local file name if <code>LOCAL_FILE</code> is not given. If an error was encountered undef is returned.</p> </dd> <dt id="put-(-LOCAL_FILE-[,-REMOTE_FILE-]-)"><a class="permalink" href="#put-(-LOCAL_FILE-%5B,-REMOTE_FILE-%5D-)">#</a><a id="put"></a><a id="put-LOCAL_FILE-REMOTE_FILE"></a>put ( LOCAL_FILE [, REMOTE_FILE ] )</dt> <dd> <p>Put a file on the remote server. <code>LOCAL_FILE</code> may be a name or a filehandle. If <code>LOCAL_FILE</code> is a filehandle then <code>REMOTE_FILE</code> must be specified. If <code>REMOTE_FILE</code> is not specified then the file will be stored in the current directory with the same leafname as <code>LOCAL_FILE</code>.</p> <p>Returns <code>REMOTE_FILE</code>, or the generated remote filename if <code>REMOTE_FILE</code> is not given.</p> <p><b>NOTE</b>: If for some reason the transfer does not complete and an error is returned then the contents that had been transferred will not be remove automatically.</p> </dd> <dt id="put_unique-(-LOCAL_FILE-[,-REMOTE_FILE-]-)"><a class="permalink" href="#put_unique-(-LOCAL_FILE-%5B,-REMOTE_FILE-%5D-)">#</a><a id="put_unique"></a><a id="put_unique-LOCAL_FILE-REMOTE_FILE"></a>put_unique ( LOCAL_FILE [, REMOTE_FILE ] )</dt> <dd> <p>Same as put but uses the <code>STOU</code> command.</p> <p>Returns the name of the file on the server.</p> </dd> <dt id="append-(-LOCAL_FILE-[,-REMOTE_FILE-]-)"><a class="permalink" href="#append-(-LOCAL_FILE-%5B,-REMOTE_FILE-%5D-)">#</a><a id="append"></a><a id="append-LOCAL_FILE-REMOTE_FILE"></a>append ( LOCAL_FILE [, REMOTE_FILE ] )</dt> <dd> <p>Same as put but appends to the file on the remote server.</p> <p>Returns <code>REMOTE_FILE</code>, or the generated remote filename if <code>REMOTE_FILE</code> is not given.</p> </dd> <dt id="unique_name-()"><a class="permalink" href="#unique_name-()">#</a><a id="unique_name"></a>unique_name ()</dt> <dd> <p>Returns the name of the last file stored on the server using the <code>STOU</code> command.</p> </dd> <dt id="mdtm-(-FILE-)"><a class="permalink" href="#mdtm-(-FILE-)">#</a><a id="mdtm"></a><a id="mdtm-FILE"></a>mdtm ( FILE )</dt> <dd> <p>Returns the <i>modification time</i> of the given file</p> </dd> <dt id="size-(-FILE-)"><a class="permalink" href="#size-(-FILE-)">#</a><a id="size"></a><a id="size-FILE"></a>size ( FILE )</dt> <dd> <p>Returns the size in bytes for the given file as stored on the remote server.</p> <p><b>NOTE</b>: The size reported is the size of the stored file on the remote server. If the file is subsequently transferred from the server in ASCII mode and the remote server and local machine have different ideas about &quot;End Of Line&quot; then the size of file on the local machine after transfer may be different.</p> </dd> <dt id="supported-(-CMD-)"><a class="permalink" href="#supported-(-CMD-)">#</a><a id="supported"></a><a id="supported-CMD"></a>supported ( CMD )</dt> <dd> <p>Returns TRUE if the remote server supports the given command.</p> </dd> <dt id="hash-(-[FILEHANDLE_GLOB_REF],[-BYTES_PER_HASH_MARK]-)"><a class="permalink" href="#hash-(-%5BFILEHANDLE_GLOB_REF%5D,%5B-BYTES_PER_HASH_MARK%5D-)">#</a><a id="hash"></a><a id="hash-FILEHANDLE_GLOB_REF-BYTES_PER_HASH_MARK"></a>hash ( [FILEHANDLE_GLOB_REF],[ BYTES_PER_HASH_MARK] )</dt> <dd> <p>Called without parameters, or with the first argument false, hash marks are suppressed. If the first argument is true but not a reference to a file handle glob, then \*STDERR is used. The second argument is the number of bytes per hash mark printed, and defaults to 1024. In all cases the return value is a reference to an array of two: the filehandle glob reference and the bytes per hash mark.</p> </dd> <dt id="feature-(-NAME-)"><a class="permalink" href="#feature-(-NAME-)">#</a><a id="feature"></a><a id="feature-NAME"></a>feature ( NAME )</dt> <dd> <p>Determine if the server supports the specified feature. The return value is a list of lines the server responded with to describe the options that it supports for the given feature. If the feature is unsupported then the empty list is returned.</p> <pre><code>if ($ftp-&gt;feature( &#39;MDTM&#39; )) { # Do something } if (grep { /\bTLS\b/ } $ftp-&gt;feature(&#39;AUTH&#39;)) { # Server supports TLS }</code></pre> </dd> </dl> <p>The following methods can return different results depending on how they are called. If the user explicitly calls either of the <code>pasv</code> or <code>port</code> methods then these methods will return a <i>true</i> or <i>false</i> value. If the user does not call either of these methods then the result will be a reference to a <code>Net::FTP::dataconn</code> based object.</p> <dl> <dt id="nlst-(-[-DIR-]-)"><a class="permalink" href="#nlst-(-%5B-DIR-%5D-)">#</a><a id="nlst"></a><a id="nlst-DIR"></a>nlst ( [ DIR ] )</dt> <dd> <p>Send an <code>NLST</code> command to the server, with an optional parameter.</p> </dd> <dt id="list-(-[-DIR-]-)"><a class="permalink" href="#list-(-%5B-DIR-%5D-)">#</a><a id="list"></a><a id="list-DIR"></a>list ( [ DIR ] )</dt> <dd> <p>Same as <code>nlst</code> but using the <code>LIST</code> command</p> </dd> <dt id="retr-(-FILE-)"><a class="permalink" href="#retr-(-FILE-)">#</a><a id="retr"></a><a id="retr-FILE"></a>retr ( FILE )</dt> <dd> <p>Begin the retrieval of a file called <code>FILE</code> from the remote server.</p> </dd> <dt id="stor-(-FILE-)"><a class="permalink" href="#stor-(-FILE-)">#</a><a id="stor"></a><a id="stor-FILE"></a>stor ( FILE )</dt> <dd> <p>Tell the server that you wish to store a file. <code>FILE</code> is the name of the new file that should be created.</p> </dd> <dt id="stou-(-FILE-)"><a class="permalink" href="#stou-(-FILE-)">#</a><a id="stou"></a><a id="stou-FILE"></a>stou ( FILE )</dt> <dd> <p>Same as <code>stor</code> but using the <code>STOU</code> command. The name of the unique file which was created on the server will be available via the <code>unique_name</code> method after the data connection has been closed.</p> </dd> <dt id="appe-(-FILE-)"><a class="permalink" href="#appe-(-FILE-)">#</a><a id="appe"></a><a id="appe-FILE"></a>appe ( FILE )</dt> <dd> <p>Tell the server that we want to append some data to the end of a file called <code>FILE</code>. If this file does not exist then create it.</p> </dd> </dl> <p>If for some reason you want to have complete control over the data connection, this includes generating it and calling the <code>response</code> method when required, then the user can use these methods to do so.</p> <p>However calling these methods only affects the use of the methods above that can return a data connection. They have no effect on methods <code>get</code>, <code>put</code>, <code>put_unique</code> and those that do not require data connections.</p> <dl> <dt id="port-(-[-PORT-]-)"><a class="permalink" href="#port-(-%5B-PORT-%5D-)">#</a><a id="port"></a><a id="port-PORT"></a>port ( [ PORT ] )</dt> <dd> <p>Send a <code>PORT</code> command to the server. If <code>PORT</code> is specified then it is sent to the server. If not, then a listen socket is created and the correct information sent to the server.</p> </dd> <dt id="pasv-()"><a class="permalink" href="#pasv-()">#</a><a id="pasv"></a>pasv ()</dt> <dd> <p>Tell the server to go into passive mode. Returns the text that represents the port on which the server is listening, this text is in a suitable form to sent to another ftp server using the <code>port</code> method.</p> </dd> </dl> <p>The following methods can be used to transfer files between two remote servers, providing that these two servers can connect directly to each other.</p> <dl> <dt id="pasv_xfer-(-SRC_FILE,-DEST_SERVER-[,-DEST_FILE-]-)"><a class="permalink" href="#pasv_xfer-(-SRC_FILE,-DEST_SERVER-%5B,-DEST_FILE-%5D-)">#</a><a id="pasv_xfer"></a><a id="pasv_xfer-SRC_FILE-DEST_SERVER-DEST_FILE"></a>pasv_xfer ( SRC_FILE, DEST_SERVER [, DEST_FILE ] )</dt> <dd> <p>This method will do a file transfer between two remote ftp servers. If <code>DEST_FILE</code> is omitted then the leaf name of <code>SRC_FILE</code> will be used.</p> </dd> <dt id="pasv_xfer_unique-(-SRC_FILE,-DEST_SERVER-[,-DEST_FILE-]-)"><a class="permalink" href="#pasv_xfer_unique-(-SRC_FILE,-DEST_SERVER-%5B,-DEST_FILE-%5D-)">#</a><a id="pasv_xfer_unique"></a><a id="pasv_xfer_unique-SRC_FILE-DEST_SERVER-DEST_FILE"></a>pasv_xfer_unique ( SRC_FILE, DEST_SERVER [, DEST_FILE ] )</dt> <dd> <p>Like <code>pasv_xfer</code> but the file is stored on the remote server using the STOU command.</p> </dd> <dt id="pasv_wait-(-NON_PASV_SERVER-)"><a class="permalink" href="#pasv_wait-(-NON_PASV_SERVER-)">#</a><a id="pasv_wait"></a><a id="pasv_wait-NON_PASV_SERVER"></a>pasv_wait ( NON_PASV_SERVER )</dt> <dd> <p>This method can be used to wait for a transfer to complete between a passive server and a non-passive server. The method should be called on the passive server with the <code>Net::FTP</code> object for the non-passive server passed as an argument.</p> </dd> <dt id="abort-()"><a class="permalink" href="#abort-()">#</a><a id="abort"></a>abort ()</dt> <dd> <p>Abort the current data transfer.</p> </dd> <dt id="quit-()"><a class="permalink" href="#quit-()">#</a><a id="quit"></a>quit ()</dt> <dd> <p>Send the QUIT command to the remote FTP server and close the socket connection.</p> </dd> </dl> <h2 id="Methods-for-the-adventurous"><a class="permalink" href="#Methods-for-the-adventurous">#</a><a id="Methods"></a>Methods for the adventurous</h2> <p><code>Net::FTP</code> inherits from <code>Net::Cmd</code> so methods defined in <code>Net::Cmd</code> may be used to send commands to the remote FTP server.</p> <dl> <dt id="quot-(CMD-[,ARGS])"><a class="permalink" href="#quot-(CMD-%5B,ARGS%5D)">#</a><a id="quot"></a><a id="quot-CMD-ARGS"></a>quot (CMD [,ARGS])</dt> <dd> <p>Send a command, that Net::FTP does not directly support, to the remote server and wait for a response.</p> <p>Returns most significant digit of the response code.</p> <p><b>WARNING</b> This call should only be used on commands that do not require data connections. Misuse of this method can hang the connection.</p> </dd> </dl> <h1 id="THE-dataconn-CLASS"><a class="permalink" href="#THE-dataconn-CLASS">#</a><a id="THE"></a>THE dataconn CLASS</h1> <p>Some of the methods defined in <code>Net::FTP</code> return an object which will be derived from this class.The dataconn class itself is derived from the <code>IO::Socket::INET</code> class, so any normal IO operations can be performed. However the following methods are defined in the dataconn class and IO should be performed using these.</p> <dl> <dt id="read-(-BUFFER,-SIZE-[,-TIMEOUT-]-)"><a class="permalink" href="#read-(-BUFFER,-SIZE-%5B,-TIMEOUT-%5D-)">#</a><a id="read"></a><a id="read-BUFFER-SIZE-TIMEOUT"></a>read ( BUFFER, SIZE [, TIMEOUT ] )</dt> <dd> <p>Read <code>SIZE</code> bytes of data from the server and place it into <code>BUFFER</code>, also performing any &lt;CRLF&gt; translation necessary. <code>TIMEOUT</code> is optional, if not given, the timeout value from the command connection will be used.</p> <p>Returns the number of bytes read before any &lt;CRLF&gt; translation.</p> </dd> <dt id="write-(-BUFFER,-SIZE-[,-TIMEOUT-]-)"><a class="permalink" href="#write-(-BUFFER,-SIZE-%5B,-TIMEOUT-%5D-)">#</a><a id="write"></a><a id="write-BUFFER-SIZE-TIMEOUT"></a>write ( BUFFER, SIZE [, TIMEOUT ] )</dt> <dd> <p>Write <code>SIZE</code> bytes of data from <code>BUFFER</code> to the server, also performing any &lt;CRLF&gt; translation necessary. <code>TIMEOUT</code> is optional, if not given, the timeout value from the command connection will be used.</p> <p>Returns the number of bytes written before any &lt;CRLF&gt; translation.</p> </dd> <dt id="bytes_read-()"><a class="permalink" href="#bytes_read-()">#</a><a id="bytes_read"></a>bytes_read ()</dt> <dd> <p>Returns the number of bytes read so far.</p> </dd> <dt id="abort-()1"><a class="permalink" href="#abort-()1">#</a><a id="abort1"></a>abort ()</dt> <dd> <p>Abort the current data transfer.</p> </dd> <dt id="close-()"><a class="permalink" href="#close-()">#</a><a id="close"></a>close ()</dt> <dd> <p>Close the data connection and get a response from the FTP server. Returns <i>true</i> if the connection was closed successfully and the first digit of the response from the server was a &#39;2&#39;.</p> </dd> </dl> <h1 id="UNIMPLEMENTED"><a class="permalink" href="#UNIMPLEMENTED">#</a>UNIMPLEMENTED</h1> <p>The following RFC959 commands have not been implemented:</p> <dl> <dt id="SMNT"><a class="permalink" href="#SMNT">#</a><b>SMNT</b></dt> <dd> <p>Mount a different file system structure without changing login or accounting information.</p> </dd> <dt id="HELP"><a class="permalink" href="#HELP">#</a><b>HELP</b></dt> <dd> <p>Ask the server for &quot;helpful information&quot; (that&#39;s what the RFC says) on the commands it accepts.</p> </dd> <dt id="MODE"><a class="permalink" href="#MODE">#</a><b>MODE</b></dt> <dd> <p>Specifies transfer mode (stream, block or compressed) for file to be transferred.</p> </dd> <dt id="SYST"><a class="permalink" href="#SYST">#</a><b>SYST</b></dt> <dd> <p>Request remote server system identification.</p> </dd> <dt id="STAT"><a class="permalink" href="#STAT">#</a><b>STAT</b></dt> <dd> <p>Request remote server status.</p> </dd> <dt id="STRU"><a class="permalink" href="#STRU">#</a><b>STRU</b></dt> <dd> <p>Specifies file structure for file to be transferred.</p> </dd> <dt id="REIN"><a class="permalink" href="#REIN">#</a><b>REIN</b></dt> <dd> <p>Reinitialize the connection, flushing all I/O and account information.</p> </dd> </dl> <h1 id="REPORTING-BUGS"><a class="permalink" href="#REPORTING-BUGS">#</a><a id="REPORTING"></a>REPORTING BUGS</h1> <p>When reporting bugs/problems please include as much information as possible. It may be difficult for me to reproduce the problem as almost every setup is different.</p> <p>A small script which yields the problem will probably be of help. It would also be useful if this script was run with the extra options <code>Debug =</code> 1&gt; passed to the constructor, and the output sent with the bug report. If you cannot include a small script then please include a Debug trace from a run of your program which does yield the problem.</p> <h1 id="AUTHOR"><a class="permalink" href="#AUTHOR">#</a>AUTHOR</h1> <p>Graham Barr &lt;gbarr@pobox.com&gt;</p> <h1 id="SEE-ALSO"><a class="permalink" href="#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1> <p><a href="/5.10.1/Net::Netrc">Net::Netrc</a> <a href="/5.10.1/Net::Cmd">Net::Cmd</a></p> <p>ftp(1), ftpd(8), RFC 959 http://www.cis.ohio-state.edu/htbin/rfc/rfc959.html</p> <h1 id="USE-EXAMPLES"><a class="permalink" href="#USE-EXAMPLES">#</a><a id="USE"></a>USE EXAMPLES</h1> <p>For an example of the use of Net::FTP see</p> <dl> <dt id="http://www.csh.rit.edu/~adam/Progs/"><a class="permalink" href="#http://www.csh.rit.edu/~adam/Progs/">#</a><a id="http"></a><a id="http:-www.csh.rit.edu-adam-Progs"></a>http://www.csh.rit.edu/~adam/Progs/</dt> <dd> <p><code>autoftp</code> is a program that can retrieve, send, or list files via the FTP protocol in a non-interactive manner.</p> </dd> </dl> <h1 id="CREDITS"><a class="permalink" href="#CREDITS">#</a>CREDITS</h1> <p>Henry Gabryjelski &lt;henryg@WPI.EDU&gt; - for the suggestion of creating directories recursively.</p> <p>Nathan Torkington &lt;gnat@frii.com&gt; - for some input on the documentation.</p> <p>Roderick Schertler &lt;roderick@gate.net&gt; - for various inputs</p> <h1 id="COPYRIGHT"><a class="permalink" href="#COPYRIGHT">#</a>COPYRIGHT</h1> <p>Copyright (c) 1995-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p> </div> <div id="footer"> <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p> <p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script> <script src="/js/highlight.pack.js"></script> <script>hljs.highlightAll();</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10