in reply to Can I avoid loops getting the single value from a hash without knowing the key?
A hash in list context returns just all pairs, so
(undef, $value) = %hash
will do!
The undef syntax just ignores the key if you really don't need it.
Regarding your code .... Sorry tl;dr, please keep it short next time!
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language)
|
|---|
| 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:24 UTC |