A couple of non-Perl suggestions:
- Do some tcpdumping (or use windump if you're on a windoze machine) to see where the packets are stopping.
- Grab any FTP client and try a manual FTP. If this works, then it's probably a problem with your Perl script.
Cheers,
Darren