# Set options # RASEO_IpHeaderCompression # RASEO_RemoteDefaultGateway # RASEO_SwCompression # without affecting any other options. $options |= 0x00000008 | 0x00000010 | 0x00000200; # Clear those same options again leaving every other option as it was $options &= ~(0x00000008 | 0x00000010 | 0x00000200); # do something if all three options are set # regardless of what other options are set. if( ($options & (0x00000008 | 0x00000010 | 0x00000200)) == (0x00000008 | 0x00000010 | 0x00000200) ) { # do something } # Do something if ONLY those three options are set if( $options == (0x00000008 | 0x00000010 | 0x00000200) ) { # do it }