!#/usr/bin/perl -w use strict; use Net::FTP; my $hostname = "sample-host"; my $ftp = Net::FTP->new($hostname); $ftp->cwd("mypath"); my @cat1 $ftp->ls("h?_*"); my @cat2 $ftp->ls("*-zips"); print "category 1:\n", join "\n",@cat1; print "category 2:\n", join "\n",@cat2; <>;