I have a six line file with base data in.  I am trying to use that data
to create HTML code.  

Data looks like

LOCATION
FORMAT
COST
START TIME
RUN BY
PRIZE

When I create the HTML some of these will be on the same line, others
will be separated by a <br>.

I want to be able to bring in each line into the correct part of the
HTML.

-----Original Message-----
From: Mark Anderson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 03, 2002 4:22 PM
To: Glenn Cannon; [EMAIL PROTECTED]
Subject: RE: Reading lines from a file


Specific by line number?  specific by text in the line?  specific as
line-by-line?  Please be more specific.  :)

To read line $x of FILE into $line:
<FILE> foreach 2..$x;
$line = <FILE>


<FILE> reads in the next line of the file.

                Hope this helps,
                                /\/\ark


-----Original Message-----
From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 12:47 PM
To: [EMAIL PROTECTED]
Subject: Reading lines from a file


How do I read a specific line from a text file?

I know how to open and close the file, and how to read the entire file,
is there a way (maybe by setting $.) to read a specific line of the
file?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to