Not your original question, but you might check out Net::Netmask which handles this stuff (including "is this IP in this mask?").
In reply to Re: bitwise operators
by Fletch
in thread bitwise operators
by gtdunlap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |