my $value = 14; #Examine 3rd bit from the right print ($value >> 3) % 2;