Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re (tilly) 1: One-liner ascii/bin

by tilly (Archbishop)
on Nov 11, 2001 at 07:29 UTC ( [id://124635]=note: print w/replies, xml ) Need Help??


in reply to One-liner ascii/bin

What do you mean by bin?

There are many possible things you could mean, and they have very different answers. For instance you could be looking for an encryption module, of which there are several on CPAN. Or you might be looking for pack and unpack. If you are on Windows try this:

perl -ne "print unpack("B*", $_)" input_file > output_file
(Use single quotes on Unix.)

You can reverse it with:

perl -ne "print pack("B*", $_)" input_file > output_file
See pack, unpack, and perlrun for more.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-29 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found