Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: Text to hex
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 4 Topic 11049 of 11532
Post > Topic >>

Re: Text to hex

by carnildo@[EMAIL PROTECTED] (Mark Wagner) May 10, 2008 at 12:54 AM

On Fri, May 9, 2008 at 10:02 PM, John W. Krahn <krahnj@[EMAIL PROTECTED]
> wrote:
> Mark Wagner wrote:
>>
>> Given a string of text, how do I convert it to a string of hexadecimal
>> values?  For example, given the string "Hello", I want the string "48
>> 65 6C 6C 6F".
>
> $ perl -le'my $string = "Hello"; print unpack "H*", $string'
> 48656c6c6f

Thanks.  Is there a good explanation of "unpack" somewhere?

-- 
Mark
 




 4 Posts in Topic:
Text to hex
carnildo@[EMAIL PROTECTED  2008-05-09 21:14:04 
Re: Text to hex
krahnj@[EMAIL PROTECTED]   2008-05-09 22:02:36 
Re: Text to hex
carnildo@[EMAIL PROTECTED  2008-05-10 00:54:23 
Re: Text to hex
krahnj@[EMAIL PROTECTED]   2008-05-10 04:39:42 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 6:19:28 CDT 2008.