Thanks that helped. However am confused with the following code
{ (keys %$_)[0] }my @hosts = map { (keys %$_)[0] } @{ $hashref->{Inventory}{host} };
can be replaced simply with
{ keys %$_ }I am not sure what
$_)[0]actually does
In reply to Re^2: getting array value from anonymous hash
by sunil9009
in thread getting array value from anonymous hash
by sunil9009
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |