| [reply] |
for (select(HANDLETOUNBUFFER)) {
$|++;
select($_);
}
But I'd argue this is just as obscure.
Moral of the story: it's ok to say my $old = select(NEW); when you need the old handle. It's fine. Don't worry. Be happy.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply. | [reply] [d/l] [select] |
I guess you can take a middle road with an explicit temporary with something like
select(do { my $oldfh = select(FH); $|++; $oldfh });
That's not too verbose and seems less obscure to me. The inevitable temporary is at least confined to a microscopic block.
Makeshifts last the longest. | [reply] [d/l] |
| [reply] |