tomy $mask = "1" x ( 32 - $cidr ) . "0" x $cidr;
since /8 means a mask of 255.0.0.0 and not 255.255.255.0 which is /24.my $mask = "1" x $cidr . "0" x ( 32 - $cidr );
In reply to Re^3: behavior of bitwise shift
by Golo
in thread behavior of bitwise shift
by ngiordano
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |