nysus has asked for the wisdom of the Perl Monks concerning the following question:

Yeah, it's 3:34 am...so what? Came across this bit of code in one of my Perl books:

unless (flock(FH, LOCK_EX|LOCK_NB)) I'm guessing the "pipe" character is the bitwise OR operator.

Two questions:
What exactly does a bitwise OR do?
How does it work in the above case?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;

Replies are listed 'Best First'.
Re: One more on file locking
by nysus (Parson) on May 13, 2001 at 12:03 UTC