in reply to Useless use of string eq
You can also use diagnostics; to get more verbose help. In this case, I don't think it would have led you to the error that Fletch pointed out, but, I have found it to be useful in other instances.
In Section
Seekers of Perl Wisdom