Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Using regex to extract keys

by Mr. Muskrat (Canon)
on Sep 24, 2003 at 20:59 UTC ( [id://294017]=note: print w/replies, xml ) Need Help??


in reply to Using regex to extract keys

Get your keys and check for matches.

my %hash = ( a44 => 'aha!', b33 => 'boo!', c45 => 'close.', d44 => 'aha!', e44 => 'aha!', f46 => 'too far...', ); my $r = 44; foreach my $key (keys %hash){ print $key."\n" if $key =~ /\w$r/; } __DATA__ e44 a44 d44

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://294017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found