Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Howto convert hex to string (and converting to binary)

by crabbdean (Pilgrim)
on Jul 18, 2004 at 11:06 UTC ( #375366=note: print w/replies, xml ) Need Help??


in reply to Howto convert hex to string

This post helped me with something. So giving back graciously (as an adjunct to this topic) can also convert to binary like this
#!perl use strict; use warnings; map { print unpack "B*", chr hex } qw\25 00 53 00 79 00 73 00 74 00 65 + 00 6d 00 52 00 6f 00 6f 00 74 00 25 00 5c 00 73 00 79 00 73 00 74 00 + 65 00 6d 00 33 00 32 00 5c 00 53 00 48 00 45 00 4c 00 4c 00 33 00 32 + 00 2e 00 64 00 6c 00 6c 00 00 00\;

Dean
The Funkster of Mirth
Programming these days takes more than a lone avenger with a compiler. - sam
RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers