looks like a nested structure to me, TIMTOWTDI

These are actually HTML form element names, not Perl variables but they are dynamically generated by a Perl script like so:

$query=$dbh->prepare("SELECT idBusiness,emaillist,private,name,title,d +escription FROM Business ORDER BY metric"); $query->execute(); while (($id,$em,$private,$text,$title,$desc)=$query->fetchrow_array()) + { $list_color=$em?'black':'slategray'; ($chk, $sub, $crm, $warmth)=$dbh->selectrow_array("SELECT Business +_idBusiness, subscribe, CRMaccess, warmth FROM Business_has_Contact W +HERE Business_idBusiness = $id AND Contact_idContact = $data{'contact +'}"); if ($chk) { $check=' checked'; $dis=''; } else { $check=''; $dis=' disabled'; } $warmth = 0 unless $warmth; $crmr_chk = $crmw_chk = ''; $crmr_chk = ' checked' if $crm; $crmw_chk = ' checked' if $crm eq 'W'; $subscribe=$sub?' checked':''; $text="<i>$text</i> <span class=\"privatelist\">[private]</span>" +if $private; print "<tr>\n<td><input type=\"checkbox\" name=\"bus_$id\" onChang +e=\"subscribe(this,$id);\"$check>\n"; print "<input type=\"checkbox\" name=\"sub_$id\"$subscribe$dis></t +d>\n"; print "<td title=\"$title\" style=\"color:$list_color\">$text</td> +\n"; print "<td style=\"text-align:center\"><input type=\"checkbox\" na +me=\"crmr_$id\" onClick=\"crmAccess(this, $id);\"$crmr_chk>\n"; print "<input type=\"checkbox\" name=\"crmw_$id\" onClick=\"crmAcc +ess(this, $id);\"$crmw_chk></td>\n"; print "<td><img src=\"/images/site/warmth$warmth.png\" style=\"wid +th:28px\"> </td>\n" if $chk; print "</tr>"; }
This is part of a 4500+ line script that was originally written a long time ago and has been added to and modified lots over the years. Hence lack of white space and other poor legibility on some of the older bits of code. Nowadays I insert spaces either side of = and a space after a comma.


In reply to Re^2: Formatting variables by Bod
in thread Formatting variables by Bod

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.