Dealing with EOL chars

Alex Brelsfoard alex.brelsfoard at
Thu Jan 24 20:06:41 GMT 2008

> Of course, you can slurp the entire file into memory and then use a regexp
> split it, so if you have enough RAM (or swap), you can fake it.

Yeah, RAM and CPU are an issue.  We are sometimes dealing with really large
Can't slurp.

Have you already looked at Text::CSV_XS? As long as the feeds are
> quoted, I think it will properly parse values containing newlines.

Yeah... but we need to be able to deal with ALL sorts of feeds, including
non-quoted feeds...

> > btw, there's no chance that I could define $/ as a regex is there?
> >
> my man perlvar (5.8.8) says: "Remember: the value of $/ is a string, not
> a regex.  awk has to be better for something. :-)"

heh, it was worth a shot.

I found PerlIO::eol that looks like it'll be great, but I know nothing about
So I don't know if this will eat up all kinds of memory or cpu.

I've tested most aspects with it and it works.
But i need to test it with inline breaks.
And I also need to find out what effects open in "raw" does.


More information about the mailing list