#!/usr/bin/perl use strict; use warnings; use Net::FTP; my $host = "blah.blahblah.nl"; my $user = "ftpuser"; my $password = "qwerty"; my $f = Net::FTP->new($host, Port => 22, Debug=> 1) or die "Cannot open $host\n"; $f->login($user,$password) or die "cannot log $user in\n"; my $dir = "/home/files/cool_beans"; $f->cwd($dir) or die "Can't cwd to $dir\n"; my @files = $f->ls; print @files, "\n";