Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

how to put html table in perl

by Samm (Initiate)
on Aug 05, 2004 at 02:06 UTC ( [id://380172]=perlquestion: print w/replies, xml ) Need Help??

Samm has asked for the wisdom of the Perl Monks concerning the following question:

I already parsed the data using perl, but now since the list is long and I want to update it every time I run the perl program how can I embed the table using html inside of my perl script.

The format looks like this

Please help
thanks

Can somebody show me how I can put html in perl

Bob, health care, date=18:18 on July 9, total = 100, sum, 80, result = +done Bob, benefit, date 11:16 on July12, total =100 Bob, dental, date 11:20 July 2, result = done Tom, health care, date=18:18 on July 9, total = 100, sum, 80, result = +done Tom, benefit, date 11:16 on July12, total =100 Tom, dental, date 11:20 July 2, result = failed <<, *** << Name Health care | Benefit | Dental Bob Date=18:18 | data data TOm total = 100 |total=100 sum= 80 result = done --------------------------

Sam

Edited by davido: Added code tags and formatting.

Replies are listed 'Best First'.
Re: how to put html table in perl
by hmerrill (Friar) on Aug 05, 2004 at 11:44 UTC
    You need to be more clear with your question - what does your data look like, and what html do you want to "embed in perl"??
      the data is long I just want to show you the foramt.
Re: how to put html table in perl
by Plankton (Vicar) on Aug 05, 2004 at 16:00 UTC
    You might want to read the information here. With a little effort you should be able to figure it out. With CGI.pm you can do things like this ...
    print table({-border=>undef}, caption('When Should You Eat Your Vegetables?'), Tr({-align=>CENTER,-valign=>TOP}, [ th(['Vegetable', 'Breakfast','Lunch','Dinner']), td(['Tomatoes' , 'no', 'yes', 'yes']), td(['Broccoli' , 'no', 'no', 'yes']), td(['Onions' , 'yes','yes', 'yes']) ] ) );

    Plankton: 1% Evil, 99% Hot Gas.
Re: how to put html table in perl
by johnnywang (Priest) on Aug 05, 2004 at 18:21 UTC
    Well, in general, you may not want to embedd html in your perl code. I'd use Template Toolkit to generate the html.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://380172]
Approved by Wampa
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2025-06-17 02:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.