#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    16
    Rep Power
    0

    How to get difference of two arrays in an array


    Hi All,

    I am having an array A having N file names. Another array is having N-x files.I want to get an array which should have N-(N-x)= x file names. Please help.
    Thanks a lot for the help in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    837
    Rep Power
    496
    There are numerous Lists modules at the CPAN (such as Lists::Utils, etc., which can do this for you (finding unions, intersection, difference, symmetric difference, etc. between two or more lists).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    16
    Rep Power
    0
    I am new to perl.never done that before. Can you please provide me the code for this.Thanks.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    16
    Rep Power
    0
    I got that. Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo