in reply to Go, go, go!
{ # set $go and $/ to undef $go=$/=$go; # grab the data into $_ $_=<DATA>; # ignore the "BAR" - this converts 'O' to '1' and 'F' to '0' y!FOO!01BAR!; # remove whitespace (so $_ just contains a big binary string) s! |\n!!go; } { # pack each 7 bit binary sequence into a character and # append to $go $go.=pack C,oct"0b$1" while s<(.{7})><>; # assign $_ the contents of $go $_=$go } { # this does nothing (but is funny) $go,$go,$go and # sort character pairs then print the second char of each pair # seems familiar ;o) print map{m<.(.)>}sort m<..>go } __DATA__ OOFFOOOOOFOO OFOO OOFFFOOOFFO FOOO FFOO OFFO FFFOOFOOOFOF OFFFFOOF OFFFOOFOOOOO OFOO FOFO FFFF FOOO FOOF OOFO FOOO OFOF OOOO FFOF OOOF OFOF OOFO FFFO OFFF OOOO OFFO OOOF FFFO OFFO FOFOOOFFOFFO FFFFFOOOFOFF OOFFFFOOOFFO FFOO OFOF FOOFFOFOFOFF FFFOOFFOOFO FFFFFOOOOFOF OOOF FFOO OOOF FFOO OFOO FFOO OFFF FOOO FF OFOO FOOO OOOF FOFO OOFO OFFO OOFFOFOO FFFO FOOO FOFO OOFO FFOO OOFO FFOOOF OOOO OFFO FOOO OOFF OFOF FFFO
|
---|