in reply to multiple "newline" delimiters
Bit of a restructure, but you could do something like this:
my $place = 0; my ($buffer, $line) = (undef, undef); while (sysread INPUT, $buffer, 1, $place) { $place++; if ( $buffer=~ m{;|/} ) { my_process_line($line); $line = undef; } else { $line .= $buffer; } }
There are, of course, problems with that code; but, the general concept should work. I don't know how fast it would be, but...
Yoda would agree with Perl design: there is no try{}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiple "newline" delimiters
by monarch (Priest) on Jun 01, 2005 at 00:32 UTC | |
|
Re^2: multiple "newline" delimiters
by lgordoncurtis (Initiate) on Jun 01, 2005 at 13:46 UTC |