Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: read file into scalar

by tsee (Curate)
on Oct 28, 2006 at 18:46 UTC ( #581101=note: print w/ replies, xml ) Need Help??

in reply to read file into scalar


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.


Comment on Re: read file into scalar
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://581101]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-11-27 12:56 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (729 votes), past polls