Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Answer: converting tiny binary strings for internet transmission

( #155105=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > converting tiny binary strings for internet transmission contributed by Juerd

Try any serializer. FreezeThaw, Storable. UUEncoding it is not such a bad idea

Comment on Answer: converting tiny binary strings for internet transmission
Re: Answer: converting tiny binary strings for internet transmission
by zentara (Archbishop) on Mar 28, 2002 at 23:41 UTC
    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";
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-09-30 20:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (383 votes), past polls