我在发送邮件的perl文件里面有下面的HTML代码。邮件部分和html部分是好的,但是当我尝试在DATA中添加Perl代码时,它显示为$BStatus
和$AStatus
!上述两个变量的值已经存在,我确认了它。如何在perl html表中显示值?
如何显示其值?
$tme=localtime();
$subject='Android Results';
use MIME::Lite;
my $msg = MIME::Lite->new (
Subject => $subject,
From => '[email protected]',
To => '[email protected]',
Type => 'text/html',
Data => '<H1>Summary</H1><br> <table border="1"> <tr bgcolor="#87CEFA"> <th>Platforms</th> <th>BStatus</th> <th>AStatus</th> <th>Results</th> </tr> <tr> <th bgcolor="#87CEFA">123</th> <td>$kstatus</td> <td>$astatus</td> <td> <a href="http://xx.xxx.xx.xx/Android/123.html">123-Results</a> </tr> <tr> <th bgcolor="#87CEFA">atgs</th> <td>row 2, cell 2</td> <td>row 2, cell 3</td> </tr> <tr> <th bgcolor="#87CEFA">8765</th> <td>row 2, cell 2</td> <td>row 2, cell 3</td> </tr> <tr></table>'
);
$msg->send();
我建议你看看[模板工具包](http://template-toolkit.org/)。 –