in reply to Recursively grep through directory trees.

Well, I made the mistake of voting you ++ before I noticed that you didn't use either 'warnings' or 'strict'.

ALWAYS USE THESE PRAGMAS!!

Other than that, pretty good code.

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/
  • Comment on (jjhorner)Recursively grep through directory trees.

Replies are listed 'Best First'.
An ancolyte "gets" it.
by Melvin (Beadle) on Jul 12, 2000 at 18:06 UTC
    FWIW: Here is a short discussion that showed me the light.

    Melvin strict bugs me though. especially for short hacks like that one.
    jcwren No no no. strict and -w are your friends. They keep you from chasing down stupid bugs (even in short code) written at 2am in the morning...
    redmist or 5:00am without sleep
    jcwren And, it ceases to be a 'short hack' when you post it. Now, it'll be around for eternity. So, not only should you appease the gods with use strict and -w, but you should make sure your name is plastered in there.
    davorg agrees whole-heartedly with jcwren
    jjhorner Melvin you never know when you may want to bundle all of your short hacks into a library of useful tools. As a matter of fact, I recommend starting that now!
    Melvin thanks for the suggestions, the code has now been strictified and warnified. =)