Perl problem: When you don't use Perl every day, it's hard to remember the combination of the for loop syntax and how to deal with the special $_ variable to refer to each element within the body of the loop.
Solution: As I write this today, I still can't remember how to get this for loop and $_ syntax to work, at least not without pulling out a book, or looking it up on the internet. A much better solution is to just use Perl's foreach syntax, and never look back.