#!/usr/bin/perl use strict; use warnings; use Net::FTPSSL; my $server = "ftps.example.com"; my $username = "*********"; my $passwd = "**********"; my @ret; my $ftps = Net::FTPSSL->new( $server, Debug => 1) or error("Cannot reach $server"); $ftps->login($username, $passwd) or error("Credential error, $ftps->last_message"); @ret = $ftps->list() or error("Command error, $ftps->last_message"); $ftps->pwd(); print @ret; #### >>> USER ******** <<< 331 Password required for ********. >>> PASS ******** <<< 230 User ******* logged in. >>> PBSZ 0 <<< 200 PBSZ Command successful. >>> PROT P <<< 200 PROT Command successful. >>> PASV <<< 227 Entering Passive Mode (**************) >>> LIST <<< 150 Opening data connection for '/bin/ls'. <<< 226 Transfer complete. >>> PWD <<< 257 "/home/*******" is current directory.