in reply to help with SEEK, TELL, READ, others

In addition, if I simply want to read the entire file into the scalar using read(), how would I do that, since I don't know the length (in bytes) to ask for?
my $buf; $scalar .= $buf while read(FH, $buf, 4096);
or
my $size = (stat FH)[7]; read(FH, $scalar, $size);
As long as all processes honor your flock, there shouldn't be a race condition with the stat + read, but it still makes me uncomfortable.