in reply to removing \n with for each
my @lines=<FILE>;
chomp(my @lines=<FILE>); # should remove your newlines.
Cheers, Sören
(hooked on the Perl Programming language)