Is the solution as simple as using chomp on the lines of your array?
In reply to Re^4: New to Perl by chromatic in thread New to Perl by rolandomantilla