Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Weird, your code works for me:
Which is exactly what you seem to want. Maybe your problem is actually elsewhere? Update: I found a problem. If there's more than one match, the code skips every second dir. The reason is that glob in scalar context is stateful, and needs on extra cycle to reset. A possible fix is to evaluate the glob in list context, and check if the list has a least one element. In reply to Re: Using grep and glob to find directories containing file
by moritz
|
|