in reply to Re^4: Net::FTP usagein thread Net::FTP usage
For what s/\s+$// does, see perlop and perlre, and compare that with chomp.