in reply to grep text (alternative)

Are you sure this doesn't belong in Obfuscated Code? I'm still scratching my head after five minutes.

This looks like a lot of cargoculted snippets, mostly stolen from ObfuPerl or Golf. I mean, I have been accused of writing short cryptic code before, so for me to say that to you, I hope you understand the significance of that. {grin}

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: grep text (alternative)
by Tanktalus (Canon) on Mar 28, 2005 at 21:33 UTC

    Five minutes? Reading it backwards, it's clear and obvious1 that it's a perlish implementation of grepping through all files in a series of directories. It takes a sub as the first param, which is used to determine if a given line matches or not, the rest of the params are the directory names to look in. It returns the list of files that have a match.

    1 No, not really.

Re^2: grep text (alternative)
by songahji (Friar) on Mar 28, 2005 at 21:17 UTC
    Good idea, let me move it.
      It's surely not easy to read!
        It's a LISP style, and it's tought to read. I was bored.