#! / usr / bin / perl # OK, Let's beginning = "10.20.30.40"; $ user = "password"; $ pass = "password"; $ pass = "password"; $ PASS = "password"; $ PATH = "/ home / mengge / testpath"; # login to Host && Change CWDmy $ ftp = new net :: ftp ($ host); $ ftp-> login ($ user, $ pass) || DIE "ERROR ON LOGGING IN: $! "; $ ftp-> cwd ($ PATH) || DIE" Error On Changing Directory: $! "; # list files in the cwdmy @allfiles = $ ftp-> ls (); foreach my $ file (@allfiles ) {Print "$ file / n";} #After list, quit $ ftp-> quit (); # end of this script.