in reply to Re: Re: split and sysread()
in thread split and sysread()
Wrong! Perl reads from the file in a buffer and only goes back out to disk when the buffer is empty. What <FILEHANDLE> does is read from the buffer up to the newline. I think you are falling prey to premature optimization.
while (<INPUT>) { my @fields = split /\|/ , $_; #Do stuff with particular field }
Cheers - L~R
Update: See this node by chromatic as he was setting me straight on the very same matter
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: split and sysread()
by relaxed137 (Acolyte) on Apr 19, 2003 at 00:32 UTC | |
by runrig (Abbot) on Apr 19, 2003 at 18:25 UTC |