1*0Sstevel@tonic-gatepackage TieOut; 2*0Sstevel@tonic-gate 3*0Sstevel@tonic-gatesub TIEHANDLE { 4*0Sstevel@tonic-gate bless( \(my $scalar), $_[0]); 5*0Sstevel@tonic-gate} 6*0Sstevel@tonic-gate 7*0Sstevel@tonic-gatesub PRINT { 8*0Sstevel@tonic-gate my $self = shift; 9*0Sstevel@tonic-gate $$self .= join('', @_); 10*0Sstevel@tonic-gate} 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gatesub PRINTF { 13*0Sstevel@tonic-gate my $self = shift; 14*0Sstevel@tonic-gate my $fmt = shift; 15*0Sstevel@tonic-gate $$self .= sprintf $fmt, @_; 16*0Sstevel@tonic-gate} 17*0Sstevel@tonic-gate 18*0Sstevel@tonic-gatesub read { 19*0Sstevel@tonic-gate my $self = shift; 20*0Sstevel@tonic-gate return substr($$self, 0, length($$self), ''); 21*0Sstevel@tonic-gate} 22*0Sstevel@tonic-gate 23*0Sstevel@tonic-gate1; 24