Another day...another problem with my output! I'm currently working on a set of code that reads input from db and generates a html page.
My Input is as follows:
ecmain109:ecmain:HP LaserJet 4050:ecserv1:Level I Support
ecmain112:ecmain:Epson 1500:none:Level II Support
ecmain144:ecmain:HP LaserJet 4050TN:ecserv1:Level I Support
ecmain145:ecmain:Lexmark 800:ecserv2:No Support
ecmain147:ecmain:HP LaserJet 8000:ecserv1:Level I Support
ecmain152:ecmain:HP LaserJet II:none:No Support
ecmain158:ecmain:HP LaserJet 4050N:ecserv2:Level I Support
ecmain159:ecmain:HP LaserJet 4MQ:ecserv1:Level I Support
ecgw110cp:Gateway:Tektronix 850:ecserv3:Level I Support
ecgw116:Gateway:HP LaserJet 4050N:ecserv3:Level I Support
Upon opening input I place data into hashes using the following code...
($name, $building, $type, $server, $support) = split ":",$_;
$pserv{$name} = $server;
$bldcnt{$building}++;
$buildinghash{$building}{$name} = $type;
$slevel{$name} = $support;
I am currently working on designing a table that contains the following:
| Server name & number of Printers | Room where located |
| Each printer-name attached to server |
I am using foreach looping to generate the table but I continually receive output that contains one table row for each printer not one for each server. If anyone can give me some tips/pointers as to how I should set up the looping required I'd greatly appreciate it.
--Psychoto
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.