Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl to a webpage/html

Status
Not open for further replies.

anything2

Technical User
Joined
Apr 1, 2007
Messages
1
Location
US
Hi
I have a perl script which processes data from a text file.I need to display the output in the form of a table using html so that it is visible on a webpage
could someone point me in the right direction
 
assumes you have already printed an http haader:

Code:
my $table = '<table>';
open(FH,'yourfile.txt') or die "$!";
while(<FH>){
   $table .= "<tr><td>$_</tr></td>\n";
}
close(FH);
$table .= '</table>';
print $table;

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top