Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding unique values between multiple arrays - Perl

    Hi,

    I got this issue where I need to know whether there is unique value between multiple arrays. Trying to describe with example,
    Say you have 5 arrays
    array1 = (1,2,3)
    array2 = (2,4,5)
    array3 = (1,7,8)
    array4 = (1,9)
    array5 = (7,6)

    The array1 and array2 has unique value which is 2 and array1 and array3 has 1. Same way there is unique value between array3 and array4 & between array3 and array5.

    Want to write a routine which will return true if this match. The number of arrays and elements in array are derived at runtime. Any solution?

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,944
    Thanks
    2
    Thanked 170 Times in 165 Posts
    Don't you mean duplicate?

    Take a look at List::Compare


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •