http://www.perlmonks.org?node_id=956398


in reply to Looping Through FTP Addresses

Initialize $newerr = 0 for each iteration of your foreach loop.