Going to see if merlyn's example works on my version of Perl... Oh neat, it does. I think his trumps mine by a bit.foreach (keys %hash) { delete($hash{$_}) if ($_ !~ /\d+_\d+/); }
In reply to Re^3: Selecting particular key-value pairs in hashes
by TedPride
in thread Selecting particular key-value pairs in hashes
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |