in reply to Unix and Windows CRLF vs LF
Yes, I know the bug in this example. It's exactly how it is on the perldocs. Took me about an half hour of debugging to figure it out. Just about drove me nuts. In any case, many thanks for the pointers, tips and hints. I needed some starting points and that is exactly what I got.local $_ = ""; while( sysread FH, $_, 8192, length ) { while( s/^((?s).*?)your_pattern/ ) { my $record = $1; # do stuff here. } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unix and Windows CRLF vs LF
by ikegami (Patriarch) on Jun 05, 2009 at 08:46 UTC |