in reply to Re^4: Net::FTP usage
in thread Net::FTP usage

For what s/\s+$// does, see perlop and perlre, and compare that with chomp.