TrueBits function in Perl
Write a function that when passed an integer returns an array with the indices (zero-indexed) of true bits in that integer, order is not important.
For example: true_bits(64) would return the array [6] because 64 equals 100000 in binary true_bits(983280) would return the array [4, 5, 6, 7, 16, 17, 18, 19] because 983280 equals 11110000000011110000 in binary