#!/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";