in reply to My most common answer to a question about Perl is:
Add print statements to see the intermediate results and the control flow.