"be consistent" | |
PerlMonks |
Chomp doesn't workby M15U (Acolyte) |
on Mar 25, 2013 at 08:48 UTC ( [id://1025253]=perlquestion: print w/replies, xml ) | Need Help?? |
M15U has asked for the wisdom of the Perl Monks concerning the following question: Hello monks I have this rather silly problem with a piece of code : I have a ".txt" file with the following lines : 1998.03.25.01 1999.10.01.01 Parameter 1 Parameter 2 There is no 'new line' between each line of the file. And this code :
Everything works, but I always seem to get a new line in my variables. I tried everything : chomp (@data_usr), or chomping first URSIN in a while loop, or chomping each new variable. It seems that each time chomp removes all the characters not only the "\n" one. What am I doing wrong ? I know it's a really newbie question. Thank you
Back to
Seekers of Perl Wisdom
|
|