in reply to TMTOWTDI isn't best in this case
Except that in this case TIMTOWTDI doesn't apply because your example produces two different end results-- which is NOT a case of doing "it", it's a case of doing different stuff. The best case here has nothing to do with Perl or its motto. It has everything to do with programmers learning to say what they mean with their code, since I expect whoever wrote {$b} didn't intend to insert {}'s into a filename, but thought they were using the ${b}. Or maybe it was an undetected typo. Even -w can't catch it when it results in valid syntax (the old too, two, to spellchecker problem).