use LWP::Simple; my $remote = 'ftp://ftp.example.com/path'; # All filenames relative to $remote my @files = qw( file1.tar.gz file2.tar.gz file3.zip subdir/another.tar.gz long/path/test.txt ); mirror("$remote/$_", "$local/$_") for @files;