|laziness, impatience, and hubris|
Tracking down the line in error or warningby PoorLuzer (Beadle)
|on Mar 24, 2009 at 12:48 UTC||Need Help??|
PoorLuzer has asked for the
wisdom of the Perl Monks concerning the following question:
A junior wrote some code like this:
I wasted 15 mins trying to figure out what was wrong at line 6, because PERL told me to look there:
Yes, I read that you should look around the block where PERL issues a warning message and not usually at the line number itself, but do understand that in real life the code which resulted in this error message was not so tiny as I have posted, neither were the number of conditions and/or branches... so visual inspection is not always very reliable neither productive..
Any suggestions on how to locate the snippet in error next time I face a similar error ?
For those still wondering, an 'eq' should be '=~'.. oh well..