http://www.perlmonks.org?node_id=897870


in reply to Re: file lock error
in thread file lock error

tried those, but it gave me an error
Bareword "LOCK_SH" not allowed while "strict subs" in use at dlpar_mks +ysb-run.plx line 62. Bareword "LOCK_NB" not allowed while "strict subs" in use at dlpar_mks +ysb-run.plx line 62. Bareword "LOCK_SH" not allowed while "strict subs" in use at dlpar_mks +ysb-run.plx line 63. Bareword "LOCK_NB" not allowed while "strict subs" in use at dlpar_mks +ysb-run.plx line 63. dlpar_mksysb-run.plx had compilation errors.

Replies are listed 'Best First'.
Re^3: file lock error
by ikegami (Patriarch) on Apr 06, 2011 at 20:09 UTC

    From the documentation to which I linked,

    import them from the Fcntl module, either individually, or as a group using the ':flock' tag.

    Add

    use Fcntl qw( :flock );

    as in the example

Re^3: file lock error
by ikegami (Patriarch) on Apr 06, 2011 at 20:10 UTC
    DUP