in reply to Inelegant code to compare file names

Thank you both for the replies. I've used Eliya's regex as it will make everything that bit shorter. I won't pretend I understand the regex 100%, but that's something I can work on when I have everything working. While I'm sure I could have got the File::Spec solution working, the docs kept talking about Unix and the backslashes Losedows uses have given me enough headaches in the past. Besides, I get the impression from the docs that I would still have to strip the extension out, so I would be using either part of my code or the regex anyway.

It's not so much about getting working code - I had that anyway - as trying to understand Perl better. I'm still very much a novice, and having the regex to work through will help me advance.

Thanks again & regards,

John Davies