passing unused data to syswrite() seems like an odd thing to do.
Since you can't control how many bytes actually get written, it makes it very easy to use syswrite:
my $to_write = length($msg); while ($to_write) { my $written = syswrite($fh, $msg, $to_write, -$to_write) or die "syswrite: $!\n"; $to_write -= $written; }
In reply to Re^3: Random read/write on a block device
by ikegami
in thread Random read/write on a block device
by FloydATC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |