#!/usr/bin/perl -w my $host = "192.168.10.155"; my $file_name = "/home/testuser/filestore/WWWMSEXP.TXT"; my $dir = "mail"; my $getname ="WWWMSEXP.TXT"; my $username = "testuser"; my $password = "secret"; use Net::FTP; $ftp = Net::FTP->new($host, Timeout =>40, Debug =>1) or die "can't connect to host"; $ftp->login($username,$password) or die "can't log in to host"; $ftp->cwd($dir) or die "can't change directory"; $ftp->ascii(); $ftp->get($getname,$file_name) or die "can't get file"; $ftp->quit();