Robin Sheat wrote:
> Hey there, what is a nice way of doing what this looks like it should
> do:
> 
> @a=([1,2,3],[5,5,5],[9,8,7]);
> @b=([5,5,5],[1,2,3]);
> @[EMAIL PROTECTED]@b;
> 
> and have @c == ([1,2,3]);
> 
> Is there a good way of doing this? (I've tried the obvious things on
> the command line, to no avail). I could probably write a function for
> it without too much trouble, but it could get ugly :)

See perldoc -q 'How do I compute the difference of two arrays?'

There are also numerous Set manipulation modules on CPAN. Try:

http://search.cpan.org/search?query=set%3A%3A&mode=module

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to