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?(while <FILE>) { chomp; print "$_\n"; # prints the current line. }
In reply to Re: How to test for a new line
by tphyahoo
in thread How to test for a new line
by BadMojo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |