Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^5: A more elegant way to filter a nested hash?

by shmem (Chancellor)
on Jun 02, 2018 at 12:29 UTC ( [id://1215732]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %hash = (
        foo => 'bar',
        (baz => $quux) x!! $quux, # list repitition, see "x" in perlop
    );
    
  2. or download this
    my %hash = (
        foo => 'bar',
    ...
    if ($quux) {
       $hash{baz} = $quux;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found