in reply to Re: assigning hash key to reference of array question
in thread assigning hash key to reference of array question
It's actually very simple to map out data structures. If it's tricky, something has gone wrong.
A collection of servers is a hash of servers keyed by name.
A server is a collection of IP addresses.
A collection of IP addresses is an array of IP addresses in dotted form.
It looks to me like you are unintentionally creating “a reference to a reference.”
His structure is fine. The problem is that he was replacing the collection of IP addresses when he wanted to add to it.
|
|---|