Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You're on the right track, but not quite. You're looking over @file2 once and @file1 twice. You can combine the loops for @file1 into a for-loop and you'll be slightly better off.
Of course, "best" is a difficult word to work with. Personally, I'd use Set and go for the intersection for both and the differences for the ones missing. My criteria for good software:
In reply to Re: optimal way of comparing 2 arrays
by dragonchild
|
|