while () { s/\r?\n?//g; # remove newlines $a.=$_; } # $a now contains the whole of DATA in one line for (split(/;/,$a)) { # split into groups $b=0; for ( split (/,/) ) { # split into singles if (!$b++) { # first letter # Store the first number of the # group as a letter $c = chr ( b($_) ); } else { # And scatter it wherever it needs # to appear in the mystery string @d[b($_)] = $c; } } } print @d; sub b { # convert from binary to decimal (littleendian) $a=$b=0; for(split(//,reverse$_[0])) { if($_) { $a+=2**$b; } $b++; } return $a; } #"The unwritten geek credo states that originality and strangeness are #good, and that blind conformity and stupidity are unforgivable." # http://samsara.circus.com/~omni/geek.html __END__ 0100000,0000100,0001100,0010001;1100001,0000101,0010011;1100011,001010 0;1100101,0001010,0001110,0010110;1101000,0001001,0010010;1101010,0000 000;1101011,0010101;1101100,0010000;1101110,0000110;1101111,0000111;11 10000,0001101;1110010,0001011,0001111,0010111;1110011,0000010;1110100, 0000011,0001000;1110101,0000001;