ok, this probably has an easy answer, but yet i can't think of it. i want to create a 
"table", not a table in html, otherwise this would be so easy, but it's not. the idea 
is, i have variable length data, and i want to be able to create a table out of it, if 
i give you a sample, and show how i'd want perl to output it, any ideas?

sample data:
1 Erazor 100 0 0
2 AnGeL` 500 0 0
4 ^ML^ 100 0 0
5 Joe 100 0 1
6 Liquid_Snake_911 100 0 0
121 Psycho 100 0 0

and i'd want the data to be outputted in this format (it'll be displayed using fixed 
width text):

--------------------------------------------------
| ID  | Nickname         | ULEVEL | SLEVEL | AOP |
|-----|------------------|--------|--------|-----|
| 1   | Erazor           |  100   |   0    |  0  |
| 2   | AnGeL`           |  500   |   0    |  0  |
| 4   | ^ML^             |  100   |   0    |  0  |
| 5   | Joe              |  100   |   0    |  1  |
| 6   | Liquid_Snake_911 |  100   |   0    |  0  |
| 121 | Psycho           |  100   |   0    |  0  |
--------------------------------------------------

but for example, if "Liquid_Snake_911" wasn't there, the table would look like:

------------------------------------------
| ID  | Nickname | ULEVEL | SLEVEL | AOP |
|-----|----------|--------|--------|-----|
| 1   | Erazor   |  100   |   0    |  0  |
| 2   | AnGeL`   |  500   |   0    |  0  |
| 4   | ^ML^     |  100   |   0    |  0  |
| 5   | Joe      |  100   |   0    |  1  |
| 121 | Psycho   |  100   |   0    |  0  |
------------------------------------------

so the column is either (length of the title + 2) or
(length of largest record + 2).

any clues on how this may be acheived?

ta

dan

Reply via email to