Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Re: One-liner ascii/bin

by blakem (Monsignor)
on Nov 12, 2001 at 17:11 UTC ( #124817=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wT
    use strict;
    ...
    =OUTPUT
    bin   => 01010010011011110110110001100110
    ascii => Rolf
    
  2. or download this
    perl -le 'print join"",map{sprintf"%08b",ord($_)}split//,pop' Rolf
    perl -le 'print join"",map{chr(oct"0b$_")}pop=~/(\d{8})/g' 01010010011
    +011110110110001100110
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2023-09-25 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?