in reply to Grep on the values of a hash seems to be failing - Tricky

the below code fails in the grep I believe

Actually, it fails long before it reaches the grep. It fails to compile:

Global symbol "$start_dir" requires explicit package name at test.pl l +ine 10. Global symbol "$start_dir" requires explicit package name at test.pl l +ine 21. BEGIN not safe after errors--compilation aborted at test.pl line 26.

Even accepting that you have provided incomplete code, it is difficult to help because you haven't provided a sample of the data the suspect grep is operating on.

I note that the grep in your second sample, which you say is working, doesn't include && !/\.plf/. Maybe that is the root of your problem?