How to FTP an entire directory via Perl?

In my Perl script, I use:
$ftp->get("$remote_file","$local_file");

But this is only for one file. Is there a way to copy an entire directory? mget didn't work in the script.

Solution: How to FTP an entire directory via Perl?

You don't need to recompile Perl to install a module.

bash$: perl -MCPAN -e shell

Once you're in (and have done the basic config for the CPAN Shell)

cpan> i /Recursive/

If it's found, just install "Net::FTP::Recursive"  (It's been a while since I've compiled modules for *nix systems, it might be "Net-FTP-Recursive")

Doing so will build and install the module, but your Perl install won't be recompiled or anything.  Recursive depends on Libnet aswell.