I have a large hash where every key in the hash is of the format:\w\d\d, and I want to use keys to extract an array of keys that match any \d\d pattern, (hence ignoring letters) like so:
This doesnt work as it is, but is there a possible solution, or should I just step through the keys ahd store an array of the ones that match?my $r = 44; foreach my $key (keys %{$self->{'residues'}{$modelCount}{/^\w$r$/}}){ print $key."\n"; }
Cheers
Sam
In reply to Using regex to extract keys by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |