Perl Monk, Perl Meditation | |
PerlMonks |
How do I compare 2 Arrays of Arrays and get a 3rd one? - updated -by Miguel (Friar) |
on Apr 02, 2004 at 00:38 UTC ( [id://341845]=perlquestion: print w/replies, xml ) | Need Help?? |
Miguel has asked for the wisdom of the Perl Monks concerning the following question:
Greetings to all Monks,
I've been seraching for some help on how to compare and extract the differences between 2 Arrays of Arrays, but I'm totally lost in here. My problem is: I have 2 @AoA
Any help on how to compare these @A0As and get a 3rd one filled with the differences?
*** UPDATE *** Esteemed Monks, thank you very much for your help. Now, as I look and try your code, I'm asking myself if my problem could be solved in another way. This is, the @AoA1 is always a subset of @A0A2, and values come from DB. The @A0A2 values are calculated like this:
This way i have a @A0A2 filled with Years and Months until a given month and a given year. My question is: would be better to push and eliminate those values that exists on both @A0As while I'm _building_ the @A0A2? If so, how should I do that? Thanks again for your patience.
Back to
Seekers of Perl Wisdom
|
|