in reply to How to test for a new line

Perl is kind to people reading in lines from a file. Usually you do this with
(while <FILE>) { chomp; print "$_\n"; # prints the current line. }
In your code, @myvar should also already be an array of lines, unless you set the input record separator $/ to undef (which you almost certainly didn't so don't worry about it). Chomp gets rid of the new line at the end of the line under usual circumstances. Maybe that helps, maybe not. What exactly are you trying to do?