Use:

if($rec =~ /^#.+/) {
$rec =~ s/^#//;
print <<eof;
<h1>$rec</h1>
eof
}

But you should close the prior table when printing this heading, and start
another one after it.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 10:34 PM
Subject: Text file format output


Hello All,
The code below shows lines in a text file with all the lines in this format
"parameter=value", now I want to read lines starting with # signs and put
them as headings in the html output, any idea , how I can achieve this.
Thanks for your help.

if ($rec =~ /=/)
            {
        ($first,$last)=split(/\=/,$rec);
               print "<tr><td><font size='2'><a
href='edit_record.cgi?&first=$first&last=$last&configfile=$database'>Edit</a
> - <a
href='edit.cgi?action=delete&first=$first&last=$last&configfile=$database'>D
elete</a></font></td><td><font size='2'>$first</font></td><td><font
size='2'>$last</font></td><td></td></tr>\n";
            }

                           Suresh.

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




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

Reply via email to