Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl FTP module

Status
Not open for further replies.

darkom

Programmer
Apr 14, 2000
28
CA
How do you change from an ascii transfer to a binary one.<br><br>Here is an exemple of my code :<br><br>&nbsp;use Net::FTP;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp = Net::FTP-&gt;new(&quot;some.host.name&quot;, Debug =&gt; 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;login(&quot;anonymous&quot;,'<A HREF="mailto:me@here.ther">me@here.ther</A>e');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;cwd(&quot;/pub&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;get(&quot;that.file&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;quit;<br><br><br>I need a syntaxe exemple please.<br>
 
there's an example of this in <A HREF="ftp://FTP.pm" TARGET="_new">FTP.pm</A> - errmm - 'perldoc Net::FTP' will display the documentation I think <p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
No it's not in perldoc.<br><br>But I have found out how and here it is :<br><br>use Net::FTP;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp = Net::FTP-&gt;new(&quot;some.host.name&quot;, Debug =&gt; 0);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;login(&quot;anonymous&quot;,'<A HREF="mailto:me@here.ther">me@here.ther</A>e');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;binary();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;cwd(&quot;/pub&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;get(&quot;that.file&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ftp-&gt;quit;<br><br><br><br>I guess that $ftp-&gt;ascii(); would work to.<br><br>So there it is.<br><br>Thanks anyway Mike<br><br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top