On Thu, 7 Dec 2000, bari wrote:

> Hi there,
> Can any one help me what this MAP function does...
>
>  map(/^[\.\d]+$/ ? td({-align=>'right'}, $_) : td($_), @$_)

$_ contains an array ref. It loops through each entry in the array ref. If
the entry is a number (by the above regexp's naive view of numbers), it
maps it to <td align="right">number</td>, otherwise it maps it to
<td>value</td>.

The use of $_ as the container for the array ref, while using map (which
gives you a $_ inside the map expression) is scary scary obfuscated
nastiness and deserves a slap for whoever wrote it.

-- 
<Matt/>

    /||    ** Director and CTO **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site: http://sergeant.org/     **
     \\//
     //\\
    //  \\


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to