$ftp_a = Net::FTP->new($remhostname, Timeout => 120, Debug => 1) || &error && die "Cant connect to $remhostname\n"; $ftp_a->login ($remusername,$rempassword) || &error && die "Cant login to $remhostname\n"; $ftp_a->binary (); $ftp_a->cwd ("$home\/$fpath") || warn "Cant find Directory $home/$fpath\n"; $ftp_a->get("$fname") or &error && die $ftp_a->message; $ftp_a->quit;