harsha.reddy has asked for the wisdom of the Perl Monks concerning the following question:
I was trying to split the contents of a tsv file.
(My TSV file contains values atoms which has \n (LF) character in them, and each row ends with CRLF.)open TSV "./MyTsv.txt" or die("Gone") while(<TSV>) { print; } close(<TSV>);
I see that in the code the lines are (split) or printed based on \n (LF) and not based on \r\n (CRLF).
I wanted to split the lines based on CRLF;
how do I tell my Perl script to consider that a CRLF and end of line instead of LF as end of line?
help me to figure this out, please.
Cheers!!
Harsha Reddy
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Spliting a TSV file on the basis of CRLF
by quester (Vicar) on Jan 02, 2008 at 07:51 UTC | |
by harsha.reddy (Acolyte) on Jan 02, 2008 at 07:55 UTC | |
by harsha.reddy (Acolyte) on Jan 02, 2008 at 10:27 UTC | |
by cdarke (Prior) on Jan 02, 2008 at 13:07 UTC |