Q:

How to delete files but not directories via FTP (with TLS encryption) in Perl?

I am currently traversing directories of a bunch of servers using TLS encryption with Net::FTPSSL::Robust. I am wanting to download the files and then delete them as I download. I do NOT want to delete folder names.
Problem is, Robust only has a get() and it doesn't delete the files it takes. I know there has to be a way to do this. As you can see here, delete will not work since it's not part of Net::FTPSSL::Robust, though it IS part of Net::FTPSSL :
my $ftp = Net::FTPSSL::Robust->new
( Host    => $server->{'ip_address'}->{content}
, Port    => $port
, SECURITY_TLS => $encryption
, user  => $server->{'username'}->{content}
, password  => $server->{'password'}->{content}
, login_attempts => 3
);

$local_dir = $server->{'local_directory'}->{content} if($server->{'local_directory'}->{content});

# when needed, many attempts will be made to retrieve all
$ftp->get("/", "".$local_dir);
$ftp->delete("/") 

Can anyone shine some light on this or have a better solution? I'm completely new to Perl, so thanks in advance.  

A:

Why not just use Net::FTPSSL or Net::SSLGlue::FTP instead of Net::FTPSSL::Robust ? Do you need anything special from Net::FTPSSL::Robust which the other modules do not offer?

