use strict; use warnings; my $quotient = 0b10010110 / 0b1111; # 150 / 15 print sprintf '%b', $quotient; # prints 1010 (decimal 10)