[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Bit-wise logical operators in MacPerl




Q: (To paraphrase...) Why does /foo | bar/ match any line with foo or bar,
   and not a line with the bitwise OR of 'foo ' and ' bar'?

A: Because in a regular expression, | separates two distinct options.
   | in a regex says that the regex matches if the stuff on the left
   or right matches.  I don't even know how you *do* a bitwise OR
   in perl...  But I expect it's documented.

Peter