in reply to Re: chomp not working in array
in thread chomp not working in array

This will not work. As others pointed out, chomp does not chomp white spaces.

Your reverse() trick will work ;-) if chomp chomps trailing white spaces.