On Fri, Jul 13, 2001 at 01:19:45PM +0100, Robin Houston wrote:
> @ary2{@ary2} = ();
> @ary1 = grep !exists $ary2{$_}, @ary1;
> print "@ary1\n";

Or even:

@ary1{@ary1} = ();
delete @ary1{@ary2};
@ary1 = keys %ary1;  

I think the moral of the story is that set operations can be done more
efficiently on hashes than arrays.

 .robin.

-- 
"It really depends on the architraves." --Harl

Reply via email to