in reply to SNMP Trap

Try to cut down the message key in parts:

  • Cut off the prefix: s/^\Qiso.3.6.1.2.1.17.7.1.2.2.1.2.\E$//
  • Get the vlan: s/^(\d+)\.//
  • Get the MAC and convert it: join("-",map { unpack("H*",chr($_)) } split(/\./))
  • Remember: TIMTOWTDT

    Replies are listed 'Best First'.
    Re^2: SNMP Trap
    by Leeon (Initiate) on Oct 25, 2011 at 15:30 UTC
      thanks Sewi i try this code
      s/^\Qiso.3.6.1.2.1.17.7.1.2.2.1.2.\E$//
      but cannot get work . maybe i make wrong something. can you write an example in "foreach" ?