Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Go, go, go!

by iamcal (Friar)
on Jun 15, 2001 at 10:15 UTC ( [id://88716]=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://88716]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-06-20 05:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.