|The stupid question is the question not asked|
Re: OUTPUT Data to a table or horizontal bar chartby hippo (Chancellor)
|on May 17, 2018 at 12:46 UTC||Need Help??|
These first few points don't relate directly to your question but rather to your code. I hope you don't mind.
I wouldn't do that and nor would the maintainer of CGI who says "HTML Generation functions should no longer be used". For the reasons listed there this is best avoided.
If you took the advice not to use the HTML Generation functions then you probably don't need this line either because all you are using the rather heavy CGI module for now is printing the header. But that's one immutable line of output so just use
and be done with it.
I really, really wouldn't do that. You are shelling out from perl to run 2 greps, an awk and a sed: three utilities which perl supercedes in 99% of cases. Think about how you could do all of this from within perl instead.
Turning to your question, I would replace your output stanza of
with something which leverages the HTML table element. eg:
Or, for a bar chart:
When you are happy with this principle you can go further and abstract it with a template if you wish, eg. Template.