No, flock after opening is correct I belive. You might be thinking of the common error of opening a file in ">" mode, which O_TRUNCates the file, thus changing it before you had a chance to flock it.
In reply to Re^3: Populating A Hash
by ambrus
in thread Populating A Hash
by dReKurCe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |