in reply to Re^2: SNMP Trap Decoding issue
in thread SNMP Trap Decoding issue
$data .= chr hex $1 while $encoded_pair =~ s/(..)//;
:-)
If you need your $encoded_pair for any other purpose after that, make a copy first, since the s/// is destructive. Or, better, do
$data = join '', map { chr hex $_ } $encoded_pair =~ /(..)/g;
BTW, could you please reformat your OP and wrap your HEX string in <code> tags? Thank you.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: SNMP Trap Decoding issue
by ikkeniet (Acolyte) on May 04, 2007 at 15:47 UTC | |
by ikkeniet (Acolyte) on May 04, 2007 at 16:07 UTC | |
by shmem (Chancellor) on May 04, 2007 at 16:16 UTC |