| Next | Tricks of the Wizards | 33 |
I promised a flush operation
$fh->flush() will flush the handle
sub flush {
my ($self) = @_; # $self is a GLOB reference
my $ofh = select $self;
my $rc;
{ local $| = 1;
$rc = print $self "";
}
select $ofh;
return $rc;
}
| Next | ![]() |
Copyright © 2003 M. J. Dominus |