[EMAIL PROTECTED] (Chris Wagner) wrote:
> I would put some print statements in there to verify that the
> variables contain what u think they contain.
Hi Chris, thanks for your reply.
Yes, I had lots of prints in my original code; I snipped those out
to make my post briefer.
> Another thing I noticed. Normally u want "opendir DIR, $top", not $DIR.
No, it needs to have $DIR. That's what makes the recursive
subroutine re-entrant. Each time the code re-enters the
subroutine, it makes a new copy of $DIR, which holds the
filehandle for the next node being inspected as it traverses
the directory tree.
> A best practice is to always have an else{} block after any if{}
> blocks to catch and debug errors.
I did have this in my original. Sysyphus asked for more complete
code, which I posted. That includes debug prints and if/else
blocks. The good thing is, the test script actually runs!
best,
/dennis
------------------------------------------------
Dennis Daupert, PhD
Senior Systems Development Professional -- CSC Account
CSC
GOS | o: 1.317.298.9499 | [EMAIL PROTECTED] | www.csc.com
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs