#!/usr/bin/perl use strict; use warnings; use Net::FTP; my $host ='192.168.0.110'; my $user = 'user'; my $pw = 'password'; 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 sprintf "Could not login: %s", $ftp->message; $ftp->cwd($path) or die sprintf "Could not cwd to %s", $ftp->message; printf "Current dir = %s\n",$ftp->pwd(); print join "\n",$ftp->dir(); print "End";