kiat has asked for the wisdom of the Perl Monks concerning the following question:
I've a hash as follows:
I'm looking for a way to get to those key-value pairs where the key has the pattern /\d+_\d+/. In order words, I would like to modify %hash so that it becomes:my %hash = ( '1_277' => 'one', '2_644' => 'some value', 'preview' => 'yes', 'page' => '10', '4_333' => 'done', 'repeat' => 'no' );
How do I do that?%hash = ( '1_277' => 'one', '2_644' => 'some value', '4_333' => 'done', }
Many thanks in anticipation :)
|
---|