|
|
| There's more than one way to do things | |
| PerlMonks |
Parsing SNMP VLAN-numbersby Dave82764 (Initiate) |
| on May 16, 2006 at 01:32 UTC ( [id://549669]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.Dave82764 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am fairly new to Perl so would appreciate if someone could point me in the right direction on this one. I am using Perl to make SNMP gets on a network switch. I retrieve the data and push it onto an array. I now need however to extract just a portion of each string and put that into another array. In the example below, I wish to take the VLAN number (1,2,10,1002,1003) and put into a separate array. I have looked at split but am not sure if this can achieve what I am after. Any assistance is much appreciated. .1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.1:INTEGER:1 .1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.2:INTEGER:1 .1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.10:INTEGER:1 .1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.1002:INTEGER:1 .1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.1003:INTEGER:1 Thanks, Dave 2006-05-16 Retitled by Corion, as per Monastery guidelines
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||