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
In reply to Re: Re: Re: split and sysread()
by Limbic~Region
in thread split and sysread()
by relaxed137
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |