You've mixed data and code, which won't work. Perhaps you're confusing perl with php?
What you want to do is separate the data and code, having the code process the data. Something like:
use strict;
use warnings;
my $data = qq{
<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>
</table>
};
# Open db for reading -- but die if there's an error
open(INFO, "data2.txt") or die "Failed to open 'data2.txt' ($!)\n";
my @array = <INFO>;
close (INFO);
my @ascend=sort(@array);
my $i = 1;
foreach my $line (@ascend){
my ($version, $okok) = split(/\|/,$line);
$data .= qq{
<TR><TD align=\"center\"> $i
</TD><TD>
$version
</TD>
};
++$i;
}
print "DATA:\n $data\n";
Update: put back $i, which I now see was in each first <td>
say
substr+lc crypt(qw $i3 SI$),4,5
-
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.
|