in reply to how to close all files

Start at 0 if you want to close stdin stdout and stderr also.

use POSIX (); ... POSIX::close( $_ ) for 3 .. 1024; ## Arbitrary upper bound

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: how to close all files
by eleron (Novice) on Oct 24, 2008 at 09:40 UTC
    Thanks to all, this last loop looks quite good for me.