#!/usr/bin/perl use strict; use warnings; use Net::FTPSSL; my @ret; my %dirlist; my $i = 0; my $win_ftp = "192.168.0.3"; my $homeftp = Net::FTPSSL->new ("$win_ftp", Port => 6500, Encryption => CLR_CRYPT, Croak => 1, ); $homeftp->login('test','test'); @ret = $homeftp->nlst('',''); for (@ret) { %dirlist = ( "$i" => "$_", ); print $dirlist{$i}; $i++; }