On Monday 13 Oct 2003 12:29 pm, Rob Dixon wrote: > Gary Stainburn wrote: > > I've got tcpdump data in HEX format, which I need to convert > > to characters so that I can then pass it through ebcdic2ascii > > so that I can ready it, i.e. > > > > how can I convert > > > > my $line='48656c6c6f20576f726c64'; > > > > so that I get > > > > print $line,"\n"; > > > > giving > > > > Hello World > > Hi Gary. > > A call to 'pack' will do the trick. As below. > > HTH, > > Rob > > > > my $line='48656c6c6f20576f726c64'; > my $string = pack 'H*', $line; > > print $string, "\n"; > > OUTPUT > > Hello World
Thanks for that Rob. I knew that I knew it, I just couldn't think of it. Gary -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]