in reply to Easy way to find data in hash or get subset of hash
As I can skip most of the entries I was wondering, is there an easier way to get the key based on the content of the values of $key
Easier than what?
See Data::Diver
On a related note, is there an easy way (read without looping myself) to copy a subset of the hash (for example all lpars on frame2) to another hash? This would speed-up the script, as most data is needed of just 1 frame (of 14 available)
Yes, write a function, then call it as many times as you want --- the function does the looping, so you don't have to repeat it yourself -- see Data::Visitor::Callback
|
|---|