Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have an array @a that contains some data. @b contains a subset of @a. I'm trying to find a concise way to create @c, which will essentially contain everything in @a that is not in @b. I realize that I can do something like this:
This method is crude and slow, but it does seem to work. I have done many searches on this site on arrays and sorting, and I get the feeling that there is a method for achieving my desired results in a faster, more concise manner. Can anybody help me? Thanks, Scott Update: merlyn and Fletch kindly pointed out that this is in the FAQ. Zaxo offered a solution that worked extremely well for me (since I had already eliminated dupes in my arrays). Thanks for the help once again, monks! :) In reply to Need to Create an Array of Differences by scottj
|
|