in reply to chomp each element of array
perldoc -f chomp chomp( LIST ) If you chomp a list, each element is chomped, ... [download]