in reply to Can I avoid loops getting the single value from a hash without knowing the key?
my $special_source = (values %{ $ComponentData{WinBinary} })[0][0]{FIL +ENAME};
or shorter, but more cryptic
my $special_source = (%{ $ComponentData{WinBinary} })[1][0]{FILENAME};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can I avoid loops getting the single value from a hash without knowing the key?
by anadem (Scribe) on Jun 12, 2014 at 22:23 UTC |