On Tue, 23 Oct 2001, Shannon Murdoch wrote:
> I am wondering if there is any way that I can take the contents of a
> specific text file line number (I suppose it could be called a paragraph,
> since a line is considered ended by a CR/LF and may contain multiple
> sentences) and put them in to a variable for manipulation.
>
> I've been using the while(<FILEHANDLE>){ command, but it's not very helpful
> when I need something on line #15 or something.
Either keep a counter as you loop through the file, or check the value of
$. (which is the number of the current line):
while(<FILEHANDLE>) {
if($. == 15) {
#do stuff...
}
}
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
Will your long-winded speeches never end?
What ails you that you keep on arguing?
-- Job 16:3
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]