Hi,
Finally I successed to print out html formal table. But now I'm facing another new problem is how to add function in the html? exmaple add in foreach function or I try to add open(INFO, "data2.txt"); # Open db for reading
@array=<INFO>;
close (INFO);
@ascend=sort(@array);
it just display this code out and not working as function. below is my example script:
my $data = qq{
open(INFO, "data2.txt"); # Open db for reading
@array=<INFO>;
close (INFO);
@ascend=sort(@array);
<h1 border=\"1\" align=\"center\">Welcome to ATCA Booking and man
+agment system<br>Chassis information and detail</h1>
<body>
<TABLE cellSpacing=\"0\" cellPadding=\"0\" border=\"1\" align=\"c
+enter\">
<TR align=\"center\"><TD>No</TD><TD>version</TD><TD>Chassis</TD><T
+D>Assigned</TD><TD>CMMIP1</TD><TD>CMMIP2</TD><TD>CMM1<br>SerialPortCo
+nnection</TD><TD>CMM2<br>SerialPortConnection</TD><TD>Ibootbar_Altuse
+n</TD></TR>
foreach $line (@ascend){
($version,$okok)=split(/\|/,$line);
<TR><TD align=\"center\">
$i++
</TD><TD>
$version
</TD>
}
</table>
};
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|