Actually it's called out of a database. Here is the code:

$db_s_id = param("scid"); my $sth = $dbh->prepare (qq{ SELECT * FROM `prods` WHERE ? IN (sub +_cat1,sub_cat2,sub_cat3) AND `u` = "1"}); $sth->execute($db_s_id); my $_cell_cnt = 0; while($row = $sth->fetchrow_hashref()) { $_cell_cnt++; $_srp_price = $row->{srp}; $_table_data .= qq~ <tr valign="middle"> <td align="center"> <a href="javascript:;" onclick="window.open('$_img +url/ShowPic.cgi?pid=$row->{pid}','POPUP','status=no,menu=no,location= +no,resizable=yes,scrollbars=yes,width=400,height=400,top=25,left=25') +; return false" onmouseover="window.status='Opens in New window'; ret +urn true" onmouseout="window.status=''; return true">~; if(-e "/home/<<user_replaced>>/www/images/prod_images/$row->{pid}. +gif") { $_table_data .= qq~<img src="$_imgurl/images/prod_images/$row- +>{pid}.gif" width="75" alt="$row->{name}" border="0">~; } else { $_table_data .= qq~<img src="$_imgurl/images/no_image.gif" wid +th="75" alt="No Image Yet Available. Sorry." border="0">~; } $_table_data .= qq~</a> </td> <td align="center"> <a href="javascript:;" onclick="window.open('$_url +?pg=$in{pg}&view=showFullItem&pid=$row->{pid}&nw=1$inc_sess_id','FULL +VIEW','status=no,menu=no,location=no,resizable=yes,scrollbars=yes,wid +th=400,height=400,top=25,left=25'); return false" onmouseover="window +.status='Opens in New window'; return true" onmouseout="window.status +=''; return true">$row->{name}</a><br>~; if($row->{instock} && ($row->{instock} == 1)) { $_stock_message = "In Stock"; $_table_data .= qq~[<a href="$_surl?pg=products&view=cart&do=a +dd_prod&pid=$row->{pid}$inc_sess_id">Add to Cart</a>] ~; } else { $_stock_message = qq~<font class="stand_out">Out of Stock</fon +t>~; } if($_logged_in && ($_logged_in == 1)) { $_table_data .= qq~[<a href="$_url?pg=products&view=wish_list& +do=add&id=$row->{pid}$inc_sess_id">Add to Wish List</a>]~; } $_table_data .= qq~<br> $row->{desc}<br> Item Number: $row->{pid}~; if($row->{itemSize} && ($row->{itemSize} ne "")) { $_table_data .= qq~ .:. Size: $row->{itemSize}~; } $_table_data .= qq~ $_stock_message~; if($row->{uom} && ($row->{uom} ne "")) { $_table_data .= qq~ .:. Unit of Measure: $row->{uom}~; } $_table_data .= qq~ </td> <td align="center" valign="top" style="padding-top: 5p +x"> ~ . escapeHTML(sprintf("%.2f", "$_srp_price")) . q +q~ </td> </tr> ~; } $sth->finish();
I will try the code you suggested and see if it works, I'll post the results. BTW, I don't eval the $_page_content which is the variable that $_table_data gets put into. I do eval $vars{} variables that contain <code></code> tags. That is the only ones I use eval on.

thx,
Richard

In reply to Re^2: Printing a dollar sign.. by powerhouse
in thread Printing a dollar sign.. by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.