Creating a html table from arrays in perl

Discussion in 'Perl Misc' started by balasubv@hotmail.com, Apr 26, 2006.

  1. Guest

    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,progrmmer,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
     
    , Apr 26, 2006
    #1
    1. Advertising

  2. Guest

    wrote:

    > @array0={1,2,3}
    > @array1={name,designation,role}
    > @array2={joe,beck,foo,nancy,joel,rooma}
    > @array3={assistant,software,manager,engineer,progrmmer,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
     
    , Apr 26, 2006
    #2
    1. Advertising

  3. Simon Taylor Guest

    Simon Taylor, Apr 27, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Williams
    Replies:
    2
    Views:
    1,174
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Rio
    Replies:
    4
    Views:
    1,242
  3. Philipp
    Replies:
    21
    Views:
    1,186
    Philipp
    Jan 20, 2009
  4. Anil A Kumar
    Replies:
    2
    Views:
    142
    J├╝rgen Exner
    Aug 3, 2011
  5. removeps groups
    Replies:
    3
    Views:
    421
    Rainer Weikusat
    Sep 13, 2012
Loading...

Share This Page