#!/usr/bin/perl print "Content-type: text/plain\n\n"; use strict; use warnings; use Net::FTP; my $host ='192.168.0.110'; my $user ='root'; my $pw ='xxxxxx'; my $file ='hello.pl'; my $path ='/home/admin/temp'; my $ftp = Net::FTP->new($host, Debug => 1) or die "Could not connect to '$host': $@"; $ftp->login($user, $pw) or die print "Could not login1: %s", $ftp->message; $ftp->cwd($path) or die print "Could not change directory to %spath", $ftp->message; $ftp->get("hello.pl") or die print "Could not get $file from $path ", $ftp->message; print "End";