Re: Text to hex

2008-05-10 Thread John W. Krahn
Mark Wagner wrote: On Fri, May 9, 2008 at 10:02 PM, John W. Krahn <[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 = "He

Re: Text to hex

2008-05-10 Thread Mark Wagner
On Fri, May 9, 2008 at 10:02 PM, John W. Krahn <[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";

Re: Text to hex

2008-05-09 Thread John W. Krahn
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 machi

Text to hex

2008-05-09 Thread Mark Wagner
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". -- Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/