On 12/12/05, Thomas, Mark - BLS CTR <[EMAIL PROTECTED]> wrote:
> > What I really want to say is
> > , if you could subtract a list from another list, (  I pretty sure you
> > can do this in Ruby and I will check )
> >
> > @wanted = $class->display_columns  - (qw/col_I_dont_want col2.../);
>
> How about:
>
> use List::Compare;
> my @columns   = $class->display_columns;
> my @dont_want = qw/col_I_dont_want col2.../;
>
> @wanted = List::Compare->new([EMAIL PROTECTED], [EMAIL 
> PROTECTED])->get_unique;
>
> - Mark.
>
>

Thanks.  I guess that would work.   I think I  like my simple
list_diff([EMAIL PROTECTED], [EMAIL PROTECTED])  function better.  I did not go 
with List::Compare
because it is too long winded and I don't need any other part of it's
functionality yet (although i may ) .

So far , I use the display_columns_minus(@b) method the most.  It is
easiest to type and remember. The list_diff method is useful too. The

display_columns(-minus => @b)

api makes it too hard to override the display_columns and I do not use
it despite my initial excitement :) .  It would be good if the sub did
not define the list it is returning. IE, if i had the list in a config
var somewhere and just used the method to access it and various
subsets of it.

cheers

"Get those items which appear (at least once) only in the first list."

I want the ones that
--
pjs


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to