dbs has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am opening a few files like this:
But I keep getting this error: error: can not lock open: (1) my code giving this error is:use FileHandle; usr Fcntl; my $RLOG = new FileHandle "+>> $runlog"; my $MLOG = new FileHandle "+>> $mksysblog"; flock($RLOG, O_NONBLOCK) || warn "no NB lock $!"; flock($MLOG, O_NONBLOCK) || warn "no NB lock $!";
plz help! thx!if ( scalar @_ == 1 ) { my $roll1 = @_; my $rollog1 = new Logfile::Rotate( File => $roll1, Count => 15, Dir => $dir, Gzip => $gzip, Flock => 'yes', Persist => 'yes' ); $rollog1->rotate(); }
Back to
Seekers of Perl Wisdom