It's not recursive, but it should do the job... my %ids = (); foreach (@arr1) { $ids{$_}++;} ... foreach (@arr8) { $ids{$_}++;} foreach (keys(%ids)) { print $_ if $ids{$_} == 8; }
This assumes that each array contains only unique ids. -David On Tue, 17 Aug 2004 08:53:21 -0500, Mehta, Perdeep <[EMAIL PROTECTED]> wrote: > Hi, > > I have a set of 8 1D arrays each containing around 100 to 150 ids. I want to > recursive parse each array to find what is common and unique across all 8 arrays and > print that out. Does any one know of an algorithm or has an idea that recursively > could do the task? > > Thanks in advance for your thoughts and time. > perdeep > > Perdeep K. Mehta, PhD > Hartwell Center for Bioinformatics & Biotechnology > St. Jude Children's Research Hospital > Memphis, TN 38105-2794 > > _______________________________________________ > Perl-Unix-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs