- or download this
my $buf; my $nread;
open(my $filehandle, '<', 'f.tmp') or die "error open: $!";
while ($nread = sysread($filehandle, $buf, 1024)) {
print "nread=$nread buf='$buf'\n";
}
- or download this
use strict;
my $buf; my $nread;
...
print $fhout $buf;
}
close($filehandle); close($fhout);
- or download this
sysread($filehandle, $buf, 1)
- or download this
sysread($filehandle, $buf, 1024)