I want to store hierarchial data like:
d1 -> {
ns1 -> {ip1,ip2},
ns2 -> {ip3,ip4},
....
....
},
d2 -> {
ns3 -> {ip3,ip5},
ns4 -> {ip6,ip9},
....
....
},
and so on…..
I know I need to use references, but I am having hard time understanding it.
Can anyone give me a head start ?
After storing like above, I need to display them in a table with d1 , ns and ip as columns
Your syntax is all messed up. Refer to perlreftut and perldsc.
I’ve rearranged it to a hash whose values are a few hash references, whose values are a few array references:
Hopefully that’s a start.