and what's the nature of the problem? i.e. what doesn't the program do correctly that you would like help with.
i did notice that you're looking for "use" surrounded by word boundary. not sure if you get a word boundary at the start of a line or not. in any case, you should be able to divide and conquer, by separating the grepping code into a little test script, and manually run it against example .pl files to watch output. if that works correctly, then the routine to generate filenames in the directory walk may need attention.