这里是我的代码和输出我无法创建不同的行我用perl每一行?
这里是我的代码:
use strict;
use warnings;
use CGI;
open(my $file1,"as.txt");
my $firstline=<$file1>;
$firstline=~s/.*=//g;
my @words=split /,/,$firstline;
my $finalline=join("\n",@words);
close $file1;
print "Content-type:text/html\n\n"
print<<"EOF";
<html><body>
<table style="width:100%">
<tr>
<th>UserName</th>
<th>Access</th>
</tr>
<tr>
<td>$finalline</td>
<td>
<input type="checkbox" value="check2" mulitple checked>Read
<input type="checkbox" value="check2" mulitple>Write
<input type="checkbox" value="check2" mulitple>Owner
</td>
</tr>
</table></body></html>
EOF
我的输出为Perl(IE $ finalline)桑卡尔morien3
我下表得到了我的表格式输出:
UserName Access
sankar morien3 Read Write Owner
预期输出:
UserName Access
sankar Read Write Owner
morien3 Read Write Owner
输入文件:(即as.txt)
cskTeam = sankar, mobrien3
[csk:/]
* = r
@cskTeam = rw