in reply to Is this a logic bug or a perl bug?

Since others have pointed out what is causing your main problems, I'd like to address some other areas

  • use strict will help you write more rugged code
  • use warnings or -w is highly recommended for much the same reason and both help in debugging
  • You check on open for failure, how about on chdir and opendir?
  • Replies are listed 'Best First'.
    Re: Re: Is this a logic bug or a perl bug?
    by weltyj (Novice) on Aug 17, 2001 at 22:09 UTC
      I whipped the code up to duplicate the problem I was having, you sharp folks found the answer -- I wasn't trying to make this example perfect in every sense, normally, I do more of the warnings and using strict and error trapping.