wfsp has asked for the wisdom of the Perl Monks concerning the following question:
When I ftp a script and run it I get 'page cannot be displayed'.
If I use my ftp prog it is ok. Is this a translation problem? I expected the 'ASCII is the default' to look after that.
If I need to set '$ftp->ascii' what 'ARGS' are needed.
I use Net::FTP for posting html files and have found it excellent.#!/usr/bin/perl use strict; use warnings; use Net::FTP; my $host = 'xxxxx'; my $uid = 'xxxxx'; my $pwd = 'xxxxx'; my $local_file = 'c:/perl/myperl/dev/test_mod.cgi'; my $remote_path = 'docroot/z_cwi_cgi/z_test'; my $remote_file = 'test_mod.cgi'; my $ftp = Net::FTP->new( $host ) or die "can't connect"; $ftp->login( $uid, $pwd ) or die "can't login"; $ftp->cwd( $remote_path ) or die "can't cwd"; $ftp->ascii() or die "can't ascii"; $ftp->put( $local_file, $remote_file ) or die "can't put"; $ftp->quit or die "can't quit";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::FTP ascii translation
by Joost (Canon) on Jul 15, 2004 at 08:48 UTC | |
by wfsp (Abbot) on Jul 15, 2004 at 09:06 UTC | |
by Joost (Canon) on Jul 15, 2004 at 09:10 UTC | |
by wfsp (Abbot) on Jul 15, 2004 at 10:22 UTC | |
by Joost (Canon) on Jul 15, 2004 at 14:40 UTC | |
|