Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: redudent hash

by citromatik (Curate)
on Jun 22, 2009 at 12:56 UTC ( #773602=note: print w/ replies, xml ) Need Help??


in reply to redudent hash

If you are using Perl 5.10 you can use the given ... when construction. See perlsyn

Update: Sorry, read too fast. Let's try again:

All the

foreach $id (keys %$HR_Cwnt) { if ($id =~ /.*?\.oracle.*?$/) { delete($$HR_Cwnt{$id}); } }

Can be simplified using Tie::Hash::Regex to something like:

delete $HR_Cwnt->{/.*?\.oracle.*?$/}

citromatik

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2016-06-30 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (388 votes). Check out past polls.