my @tempArr = unpack("B64", $key); my @keyBitsArr = map { $_ + 0 } split("", $tempArr[0]);