Hello Rasnita, IAm I doing the right thing, here, some how my table appears after the text. You help in this regards is greatly appreciated. Suresh.
foreach $rec (@ODB){ chomp($rec); if($rec =~ /^#.+/) { $rec =~ s/^#//; print <<eof; <h1>$rec</h1> if ($rec =~ /=/) { ($first,$last)=split(/\=/,$rec); print "<h1>$rec</h1><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"; } eof } ----- Original Message ----- From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 11:36 PM Subject: Re: Text file format output > 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] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]