#!/usr/bin/perl -w use strict; use Net::FTP; my $home="yada.com"; my $username="user"; my $password="pwd"; my $filename='file.txt'; my $newfile = "extract.txt"; my $ftp = Net::FTP->new("$home") or die "Can't connect: $@\n"; $ftp->login($username, $password) or die "Couldn't login\n"; $ftp->get($filename, $newfile) or die "Couldn't get $filename\n";