Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: One-liner ascii/bin

by I0 (Priest)
on Nov 13, 2001 at 11:25 UTC ( [id://125013]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: One-liner ascii/bin
in thread One-liner ascii/bin

perl -e 'print unpack"B*",shift' Rolf
perl -e 'print pack"B*",shift' 01010010011011110110110001100110

Replies are listed 'Best First'.
Re: Re: Re: Re: One-liner ascii/bin
by blakem (Monsignor) on Nov 13, 2001 at 11:48 UTC
    Nice. For some reason I thought this approach had been suggested and rejected by Rolf but I misunderstood which part he objected to. These are much cleaner than the ones I came up with above.

    -Blake

Re: Re: Re: Re: One-liner ascii/bin
by Rolf (Novice) on Nov 22, 2001 at 17:30 UTC
    Hi, You are so veeery close, only that I get: Can't find string terminator "'" anywhere before EOF at -e line 1.

      Hi, You are so veeery close, only that I get: Can't find string terminator "'" anywhere before EOF at -e line 1. : Rolf

      It appears you are using CMD or COMMAND in Windows for your command-line interpretor, which doesn't know what to do with the quotes. Change I0's one-liner to this:

      perl -e "print unpack qq(B*),shift" Rolf

      ... and it will work.

      mkmcconn
      (or use cygwin, instead)

        Thank you so much!! It works really nice, and a big thanks to everybody for helping me with this. Regards Rolf

Log In?
Username:
Password:

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

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

    No recent polls found