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 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]