Just curious, then. I really don't know how to check, so I'll just ask (ah, ignorance and laziness....). Does closedir execute if it is part of a print statement? print ++$someVar; would execute the incriment even though it is part of a print statement. Are there any rules as to what executes as part of another statement and what doesn't?