Handles that aren't open come back as undef in this array. So $handles[0] is STDIN, etc.use FileHandle; my @handles = map FileHandle->new_from_fd($_, "r"), 0..100;
If you don't need the mapping from specific fd, then add grep defined($_), in front of the map.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: open file descriptors
by merlyn
in thread open file descriptors
by jeremyh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |