in reply to Compare two index lists

Sounds like a simple intersection to me. If so, the Set::Array module might fit your needs.