Turned out to be a line buffering issue. The following works. #!/usr/bin/perl
open(my $fh, '>', '/tmp/test.txt');
select(STDOUT);
$|++;
select($fh);
$|++;
print STDOUT "register|report|smtp-in|*\n";
print STDOUT "register|ready\n";
while ( my $line = <> ) {
print $fh "$line";
}
close $fh;
0;
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]
