#!/usr/bin/perl -w use strict; use Net::FTP; #use CGI::Carp qw(fatalsToBrowser warningsToBrowser); my $ftp = Net::FTP->new("ftp.xxxxx.xxx"); $ftp->pasv; $ftp->login('xxx','xxx'); my @files = $ftp->ls('/tst') or die "could not do ls"; print "Content-Type: text/html\n\n"; print "$_\n" for @files; print "done\n";