in reply to Net::FTP downloading multiple files from multiple directories

You're doing a $ftp->cwd($directory) at the beginning, and then in your loop, you're looking in "$directory/$_", which means you're looking at /data/data/<filename>, instead of /data/<filename>, are you sure that was what you meant to do?

My guess is that you want to remove the first $ftp->cwd($directory). And maybe check if that @lines1 and the loop following it actually contain/do anything.

C.