Perl Monk, Perl Meditation | |
PerlMonks |
Re: compare 2 arrays for intersect diff and commmon valuesby kcott (Archbishop) |
on Mar 25, 2014 at 04:43 UTC ( [id://1079633]=note: print w/replies, xml ) | Need Help?? |
G'day rasgolla, Welcome to the monastery. "I am getting output as ..." Please show actual output between <code>...</code> tags. That way we can see exactly what you're seeing. Please also show expected output (again, between <code>...</code> tags). Then we can see the difference between what you got and what you were trying to get. From what you've posted, if
is producing
but you actually wanted something like
then you'll need to dereference the $difference[0] arrayref:
That possibly raises a few questions, most of which may be answered by "Perl references short introduction". If you have further questions, please follow the guidelines in "How do I post a question effectively?". Also, using a logical indentation, will make your code more readable for both you and us: that equates to less errors by you and, for us, a greater inclination to actually read your code. -- Ken
In Section
Seekers of Perl Wisdom
|
|