Presently I'm printing all results data to an output.txt file but I also want to arrange all data in tabular format so as to open it on web-browser.Below is my PERL code from which I am printing all data in output file.

printf OUT "%-15s %-13s %-16s %-13s\n",$fname,$drctotal,$metaltotal,$b +asetotal); for ($i=0;$i<5;$i++){ printf OUT "%-30s %-10s %-30s %-10s\n",$METAL[$i],$METALVAL[$i],$BASE[ +$i],$BASEVAL[$i]; }
In HTML code will be like this:
<table> <tr> <td>$fname</td> <td>$drctotal</td> <td>$metaltotal</td> <td>$basetotal</td> <td>$METAL[0] $METALVAL[0] </br> $METAL[1] $METALVAL[1] </br> $METAL[2] $METALVAL[2] </br> $METAL[3] $METALVAL[3] </br> $METAL[4] $METALVAL[4] </br> </td> <td>$BASE[0] $BASEVAL[0] </br> $BASE[1] $BASEVAL[1] </br> $BASE[2] $BASEVAL[2] </br> $BASE[3] $BASEVAL[3] </br> $BASE[4] $BASEVAL[4] </br> </td> </tr> </table>

I want to put this HTML in my PERL script such that on executing script, output in the form of table get pops up on browser. I am new with PERL and any of the package can't be installed on my shared server linux. So please help me what would be the exact script to get the required output on browser.


In reply to Re^2: PERL-CGI on shared unix server by rahu_6697
in thread PERL-CGI on shared unix server by rahu_6697

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.