in reply to file lock error

Valid arguments for flock are

No idea what you meant by flock O_NONBLOCK.

Replies are listed 'Best First'.
Re^2: file lock error
by dbs (Sexton) on Apr 06, 2011 at 19:58 UTC
    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.

      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

      DUP