1. Package wrapper for NET::FTP (error checking) 2. main code that creates threads and self master. # File 1 package myFtp; use Net::FTP; use Net::Cmd; our @ftpObj; our @ftpList = (); our @code; sub Connect { my ($ftpServer, $ftpTimeout, $connection_type) = @_; #debug ("Trying -> ", $ftpServer); $ftpObj = Net::FTP->new($ftpServer, Timeout => $ftpTimeout, Passive => $connection_type); return; } #other functions....