![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
Re: How can I set a bit to 0 ?by stevieb (Canon) |
on May 26, 2022 at 20:56 UTC ( #11144206=note: print w/replies, xml ) | Need Help?? |
I prototype a lot of my C microcontroller code in Perl, and for that purpose so I, and others might benefit, I wrote Bit::Manip. That contains code that has to be compiled, so for a Pure Perl version, there's Bit::Manip::PP. It does all the things that we who have to do bitwise operations from time-to-time but not as a profession (or often enough to remember how) we need to do. Here's an example of turning 'off' a bit: Code:
Output:
In Section
Seekers of Perl Wisdom
|
|