sub f{my%D;@D{@_}=();for(@_){if(-d){next if${_}eq'.';my@g;opendir(D,${ +_})||next; while(defined(my$d=readdir(D))){unless(${d}eq'.'or${d}eq'..'){push@g," +${_}/$d"}} closedir(D);push@f,grep({-f}@g);f(grep((!exists($D{$_})),grep({-d}@g)) +)}elsif(-f ){push@f,$_}}return@f}my$q=qr/["']\w[^\W\d]{3}\h\w{5}([[:alpha:]])\S\b +\N\D\1\w+? \s\p{PosixAlpha}\B.[\x63-\x72]{4,},?(?:\\n)?["']/six;do{-T||next;open( +_,'<',$_); sysread _,$_,-s;if(/$q/o){$_=eval$&;chomp;local$\=$/;print;exit}}forea +ch(f@INC);

Replies are listed 'Best First'.
Re: JAPH Module
by choroba (Cardinal) on Nov 03, 2011 at 18:46 UTC
    What version of Perl does it run in? I get
    Bareword found where operator expected at - line 6, near "]{4}\b,?\\?n +?["']/a" (Might be a runaway multi-line // string starting on line 4) (Missing operator before a?) syntax error at - line 6, near "]{4}\b,?\\?n?["']/a" Execution of - aborted due to compilation errors.
    in 5.12.1.
      I think it runs only in perl>=5.14.1, but you can try to run it without '/a' option.

      * Edited the main code. Should work now in perl>=5.12.1
        It works :) nice one.