I would probably do it this way:
my @vlan_numbers; foreach ( @snmp_strings ) { if( /\.(\d+):\w/ ) { push @vlan_numbers, $1; } } print "$_\n" foreach @vlan_numbers;
Dave
In reply to Re: Parsing SNMP VLAN-numbers
by davido
in thread Parsing SNMP VLAN-numbers
by Dave82764
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |