You could get the values like this:
You could even pass the values into a function directly, instead of catching them in the array first. It just depends on what your goal is.my %hash = ( "NETWORK1" => "A", "NETWORK2" => "B", "TYPE1" => "C", "TYPE2" => "D"); my @networks = @hash{ grep /^NETWORK/, sort keys %hash };
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: Hash slices
by QM
in thread Hash slices
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |