Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Creating a html table from arrays in perl

Reply
Thread Tools

Creating a html table from arrays in perl

 
 
balasubv@hotmail.com
Guest
Posts: n/a
 
      04-26-2006
Hi all,
Is it possible to create a html table to be presented as a webpage from
values stored in a perl array
for example my perl file outputs 3 arrays in the first pass and another
similar set of arrays in the next pass
@array0={1,2,3}
@array1={name,designation,role}
@array2={joe,beck,foo,nancy,joel,rooma}
@array3={assistant,software,manager,engineer,progr mmer,developer,joker,cleaner}

i need to create a html table which looks like this and so on and so
forth from the arrays dynamically
1 ....2
name designation role name designation role
joe assistant
beck manager
foo engineer
nancy programmer
joel joker
roma cleaner


Can i use HTML::Table; module of perl ? Has anybody implemented this?
if so can i get an example of how this can be done?

thanks in advance for all the help
bala

 
Reply With Quote
 
 
 
 
usenet@DavidFilmer.com
Guest
Posts: n/a
 
      04-26-2006
wrote:

> @array0={1,2,3}
> @array1={name,designation,role}
> @array2={joe,beck,foo,nancy,joel,rooma}
> @array3={assistant,software,manager,engineer,progr mmer,developer,joker,cleaner}
>
> i need to create a html table which looks like this and so on and so
> forth from the arrays dynamically
> 1 ....2
> name designation role name designation role
> joe assistant
> beck manager
> foo engineer


Can you explain how you get from your arrays to the sample output you
presented? You seem to have three column headers (name designation
role) but only two values. And your output skips items in your third
array without explanation.

I can't make sense of the how the output is supposed to be derived (I
cannot see how @array2 relates to @array3, or how @array1 relates to
either of them, and the purpose of @array0 is unclear). I can't help
you accomplish a task that I cannot understand, but maybe there are
some mind-readers in the group...

--
http://DavidFilmer.com

 
Reply With Quote
 
 
 
 
Simon Taylor
Guest
Posts: n/a
 
      04-27-2006
wrote:
> Hi all,
> Is it possible to create a html table to be presented as a webpage from
> values stored in a perl array



We've used Data::Table for this purpose, it's quite handy:

http://search.cpan.org/~ezdb/Data-Table-1.44/Table.pm

Regards,

Simon Taylor
--
www.perlmeme.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
an array of of arrays in Perl, behavior different in Strawberry andLinux perl removeps groups Perl Misc 3 09-13-2012 10:43 AM
need help in perl arrays (New to perl but know TCL well) Anil A Kumar Perl Misc 2 08-03-2011 12:40 PM
Multidimensional arrays and arrays of arrays Philipp Java 21 01-20-2009 08:33 AM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments