Re: Text to hex
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Fri, 09 May 2008 22:02:36 -0700
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
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.
- Follow-Ups:
- Re: Text to hex
- From: Mark Wagner
- Re: Text to hex
- References:
- Text to hex
- From: Mark Wagner
- Text to hex
- Prev by Date: Text to hex
- Next by Date: perl-support for vim help needed
- Previous by thread: Text to hex
- Next by thread: Re: Text to hex
- Index(es):
Relevant Pages
|