in reply to Data::Dumper / write output into Mysql
If you really just want to extract each MAC address from the hashref, this should do it:
use strict; use warnings; my $result = { '10.4.20.21' => { #IP Address from CPE equipment. '1' => '0x0a003edd8706', #Bridge table entry #1 '2' => '0x1a003edd8706', #Bridge table entry #2 '3' => '0xc03f0eddfb3b' #Bridge table entry #3 } }; for my $mac (values %{(values %$result)[0]}) { print "Mac addr: $mac\n"; }
Depending on your use case you may need more than this but hopefully it points you in the right direction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data::Dumper / write output into Mysql
by Anonymous Monk on Oct 07, 2015 at 05:07 UTC | |
|
Re^2: Data::Dumper / write output into Mysql
by steph007 (Initiate) on Nov 05, 2015 at 09:50 UTC | |
by hippo (Archbishop) on Nov 05, 2015 at 13:30 UTC | |
by steph007 (Initiate) on Nov 05, 2015 at 13:41 UTC |