in reply to Re: grep -Pin thread grep -P
But just for fun:
perl -MFile::Find -ne 'find(& sub { $f = 1; if (/pat/ and $f) { $f = 0 +; print $File::Find::name . "\n" }, "mydir");' [download]
...or something like that.
-Andrew.