我在發送郵件的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/)。 –