in reply to Re^2: Bad file descriptor error
in thread Bad file descriptor error

The 4 spaces look much better.

But the comments you proposed don't add anything of value. "open the directory handle ..." is as easy or difficult to understand as "opendir(...) or ...". Even more obvious with the closedir line, the comment is just redundant noise.

Comments should add information not repeat it IMHO. A good place for comments is at the start of a subroutine, to exactly specify what parameters are expected and what is returned. Or at really complicated lines to sum up what is done there

Replies are listed 'Best First'.
Re^4: Bad file descriptor error
by Lamont85 (Novice) on Mar 22, 2010 at 20:57 UTC

    Thank you, everyone.

    I supose the misplacement of the closedir statement was also due to the late hour and lack of sleep, but proper indentation could have avoided that ID10T error.
    File::Find was a godsend in this case. Thank you for the advice.