1 use warnings; 2 use strict; 3 my $readbuff; 4 my $sysreadbuff; 5 6 my $readbyt = read(STDIN, $readbuff, 10); 7 print "read get:$readbuff "; 8 print "read return:$readbyt "; 9 my $sysreadbyt = sysread(STDIN, $sysreadbuff, 10); 10 print "sysread get:$sysreadbuff "; 11 print "sysread return:$sysreadbyt ";
sysread使用无缓冲
read使用缓冲