in reply to comparing arrays

I think List::Compare may help you to do this.

Prasad