in reply to closing multiple filehandles with one command

Would this qualify?
$_->close for $OUT1, $OUT2, $OUT3, $OUT4, $OUT5;

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: closing multiple filehandles with one command
by phaylon (Curate) on Aug 09, 2005 at 16:01 UTC
    As addition, because I see many numbered filehandles in some coworkers code:

    Or, if they're saved in a hash (which is imo the better way if you have no fixed or a large number of handles):
    # untested $hash{ $_ }->close for keys %hash;

    Ordinary morality is for ordinary people. -- Aleister Crowley
        Definitly your point.

        Ordinary morality is for ordinary people. -- Aleister Crowley
      A reply falls below the community's threshold of quality. You may see it by logging in.
Re^2: closing multiple filehandles with one command
by Anonymous Monk on Aug 09, 2005 at 16:25 UTC
    excellent....
    I don't know why I didn' think of that.
    Guess that's why you are the wizard and...
    I am still learning.
    Thanks!