$a = ord $/; $b = $a - 9; for( 483315457, 3759149058, 3883269635, 3794874370, 1647390720, 1644171264, 1912787457, 4277106435, 4100403459, 608567554, 608436482 ) { $c = 0; for( split//, substr unpack("B*", pack"L*", $_), 6 ) { $o[$c] += (ord d, ord 2, $a, $a, $a, $a, $a/2, $b, $b, $b, $b)[$i] if $_; $c++; } $i++; } print chr for @o; #### for( '01110011111100111000011100', '10000100000001000011100000', '11111111100111010111100111', '10001100000011000111100010', '00001100000011000101100010', '00000100000000000001100010', '01110100100000001001110010', '11011101111110111111111110', '11001100010110011111110100', '10000000010100011000100100', '10000000010100010000100100', ) { $c = 0; for( split//, $_ ) { $o[$c] += (100, 50, 10, 10, 10, 10, 5, 1, 1, 1, 1)[$i] if $_; $c++; } $i++; } print chr for @o; #### sub increment_pos { my ($bitstring, $inc) = @_; my @bits = split //, $bitstring; for my $i (0 .. $#bitstring) { $o[$i] += $inc if $bitstring[$i]; } } increment_pos('01110011111100111000011100' => 100); increment_pos('10000100000001000011100000' => 50); increment_pos('11111111100111010111100111' => 10); increment_pos('10001100000011000111100010' => 10); increment_pos('00001100000011000101100010' => 10); increment_pos('00000100000000000001100010' => 10); increment_pos('01110100100000001001110010' => 5); increment_pos('11011101111110111111111110' => 1); increment_pos('11001100010110011111110100' => 1); increment_pos('10000000010100011000100100' => 1); increment_pos('10000000010100010000100100' => 1); print chr for @o;