in reply to Parsing a hash table for only variables that are uppercase.
Actually, as long as your print statement includes $key, your output is also not going to be formatted quite as you expect: "TEST IABC amBAR a monk in training" is one possibility. (Note the lack of spaces, too.) What you really want inside the loop is probably something like this:
print $runset{$key}, " "
Or, even more Perlish, get rid of the enclosing loop and just use this:
print join " ", values %runset;
This latter version also eliminates the trailing space, because join only inserts delimiters between list elements.
|
|---|