in reply to how to print 'normal' string from hex string?
Expanding Eliya's reply slightly.
knoppix@Microknoppix:~$ perl -E ' > $hex = q{4d414a523e576573742d622053544d2d31204d532d41495328434c45415 +229}; > $str = unpack q{a*}, pack q{H*}, $hex; > say $str;' MAJR>West-b STM-1 MS-AIS(CLEAR) knoppix@Microknoppix:~$
As BrowserUk points out, the unpack here is not necessary.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to print 'normal' string from hex string?
by BrowserUk (Patriarch) on Nov 22, 2011 at 17:54 UTC | |
by johngg (Canon) on Nov 23, 2011 at 11:17 UTC |