You could simply return the value of ($bytetocheck >> $bittocheck) & 1, since it will return 0 or 1. And it's unnecessary to use the '&' when calling your function.
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perlhacker How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart