473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to display values in perl html table?

Hi,

I've the below HTML code inside a perl file where i'm sending a mail. The mail part and html part is fine. but when i try to add perl code inside DATA as $BStatus and $AStatus its showing as it is! Values for the above two variables is already present and i confirmed it.
How do i display its values. Kindly help.

Expand|Select|Wrap|Line Numbers
  1.  $tme=localtime(); $subject='Android Results';  use MIME::Lite; my $msg = MIME::Lite->new ( Subject => $subject, From    => 'xyz@gmail.com', To      => 'xyz@gmail.com', 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>
  2. '
  3. );
  4. $msg->send();
  5.  
Thanks.
Aug 12 '13 #1
1 1627
rski
700 Expert 512MB
you have to surround DATA part with " " not ' ', like that
Expand|Select|Wrap|Line Numbers
  1. my $subject='Android Results';
  2.  
  3. use MIME::Lite;
  4.  
  5. my $msg = MIME::Lite->new (     Subject => $subject
  6.                                 , From    => 'xxxx@gmail.com'
  7.                                 , To      => 'yyyy@gmail.com'
  8.                                 , Type    => 'text/html'
  9.                                 , 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>
  10. "
  11. );
  12.  
  13. $msg->send();
  14.  
  15.  
Aug 26 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Marco | last post by:
Hello there ;) I'm trying to build a scrip that would open a page that has a table and then get all the values as variables so I can put them in a MySQL DB. The problem is that I don't really...
3
by: Al Wilkerson | last post by:
Hey, I have a Web Form with a drop down list, textbox, and search button. When click the search button an SQL server database is queried fordata. Once I have the data in a dataset I use the...
1
by: jaw_nee_g | last post by:
Hi, I'm new to Access and have what would seem to be a simple question: I'm looking to organize dates, tests, serial numbers and results. On some given date, a series of 16 tests are run on...
1
by: Eric | last post by:
Is it possible that in a continous form i create a listbox which is not a part of a table and disply some values. For eg: TableA has a field FieldA. I run a query on TableA when it loads it match...
4
by: xzzy | last post by:
I have hit a wall with not being able to enumerate the items collection in a table row. given: <table runat=server id=table1> <tr> <td id=AAA>HowToReferenceThisValue</td> etc...
0
by: veegamca | last post by:
Hi to All, Any one help me out, to assign values to HTML Table , which can be exported to Excel Sheet Thanks and Regards Veera
2
by: bhargavi514 | last post by:
friends i need a php code to retrieve 10 records from database and display values in a table by using php and my sql
0
by: Jeff | last post by:
hey asp.net 3.5 I'm developing a webportal which need to access a webpage of a external system. The external webpage contain a table which I want to retrieve the values from.. it is a html...
4
by: Vivekneo | last post by:
Hi, iam trying to display student names along with their course selected and status of their selection, from mysql db, the result has to be in tabular format, with alternate row bg color, here is my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.