Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: redudent hash

by citromatik (Curate)
on Jun 22, 2009 at 12:56 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://773602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found