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

Re: Answer: converting tiny binary strings for internet transmission

by zentara (Archbishop)
on Mar 28, 2002 at 23:41 UTC ( [id://155153]=note: print w/replies, xml ) Need Help??


in reply to Re: converting tiny binary strings for internet transmission
in thread converting tiny binary strings for internet transmission

Thanks for that pointer to serializers. I have done the following as a first attempt. Just send the hex. The one thing that gets me with this, is that when the last print occurs, it messes up my display, putting everything in binary. How do I prevent this? Anyone?
#!/usr/bin/perl use strict; use warnings; open(FH,"<adminpass"); binmode FH; my $binstring= <FH>; print "$binstring\n"; my $hexstr= unpack "H*",$binstring; print "$hexstr\n"; my $binback= pack "H*",$hexstr; print "$binback\n";
  • Comment on Re: Answer: converting tiny binary strings for internet transmission
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-25 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found