<?xml version="1.0" encoding="windows-1252"?>
<node id="564872" title="Re: Secret Perl Operators: the boolean list squash operator, x!! (grep)" created="2006-07-31 16:59:40" updated="2006-07-31 12:59:40">
<type id="11">
note</type>
<author id="22609">
tye</author>
<data>
<field name="doctext">
&lt;p&gt;
Comparing:
&lt;/p&gt;&lt;c&gt;
( list ) x!! cond
( grep cond, list )
cond ? ( list ) : ()
&lt;/c&gt;&lt;p&gt;
I think I'd rather "reuse" the well-known [grep] for this case than adopt the more cryptic idiom you've invented.  For your example case, I much prefer something that uses:
&lt;/p&gt;&lt;c&gt;
join '/', grep defined $_, ...
&lt;/c&gt;&lt;p&gt;
Rather than repeating most of the terms twice (and repeating x!! and [defined]).
&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-22609"&gt;&lt;p align="right"&gt;
- [tye]&lt;tt&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/tt&gt;
&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
564792</field>
<field name="parent_node">
564792</field>
</data>
</node>
