in reply to Re: Giving names to bits
in thread Giving names to bits

Thanks, that works great. The only thing to do there was to initially set the status to 0 (so that vec and by ricochet logic does not complain) and then to add the actual hash set/unset to each subroutine so that it's possible to use the hash for showing the status of the individual bits easily.

Since a hash is used, wouldn't it be possible to simply use it and let go of the $status variable i.e. when time to do so, to pack the hash 1/0 values in a byte ?

Replies are listed 'Best First'.
Re^3: Giving names to bits
by Tanktalus (Canon) on Feb 23, 2007 at 14:52 UTC

    Serves me right... that was my last option, the one I didn't give an example for ;-)