my ($y,$l) = protocol_expect {
m/^data-block (.*})$|data-end$/;
length $1 ? (1,$1) : (0);
- } \*STDIN;
+ } $fh;
last unless $y;
- my $d = protocol_read_bytes \*STDIN, $1;
+ my $d = protocol_read_bytes $fh, $1;
print PF $d or die $!;
}
printdebug "received into $ourfn\n";