pankaj_it09 has asked for the wisdom of the Perl Monks concerning the following question:

When I do the below only the first filehandle becomes hot:

my $true = select FILE1;
$| = 1;
select $true;

my $false = select FILE2;
$| = 1;
select $false;

my $track = select FILE3;
$| = 1;
select $track;


How to make all of them hot ?
  • Comment on How to make multiple filehandles hot(deactivating buffering) ?

Replies are listed 'Best First'.
Re: How to make multiple filehandles hot(deactivating buffering) ?
by shmem (Chancellor) on Mar 09, 2009 at 12:41 UTC
    use IO::Handle; # open files, then do $_ -> autoflush (1) for FILE1, FILE2, FILE3;
Re: How to make multiple filehandles hot(deactivating buffering) ?
by targetsmart (Curate) on Mar 09, 2009 at 12:40 UTC
    Did you tried IO::Handle/IO::File/FileHandle and its autoflush

    Vivek
    -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
Re: How to make multiple filehandles hot(deactivating buffering) ?
by Anonymous Monk on Mar 09, 2009 at 12:06 UTC