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 misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to