Hi,
perhaps you're doing it just for brevity, but I can't resist pointing out that it's a very bad idea to use flock() with numeric constants (e.g. 1). You should use the Fcntl module and import the flock constants:
use Fcntl qw/:flock/; ... open flock($fh, FLOCK_EX); # or: flock($fh, FLOCK_SH); ...
Aside from being portable, it has the added benefit of being more friendly on the eyes and less demanding to your memory.
Steffen
In reply to Re: read file into scalar
by tsee
in thread read file into scalar
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |