Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Consise way to filter out keys with undef values from a hash slice?

by tybalt89 (Monsignor)
on Jun 01, 2020 at 22:31 UTC ( [id://11117578]=note: print w/replies, xml ) Need Help??


in reply to Consise way to filter out keys with undef values from a hash slice?

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11117569 use warnings; my %args = (profile => 'foo'); my %ta = %args{ grep defined $args{$_}, 'profile', 'user', 'password' +}; use Data::Dump 'dd'; dd \%ta;
  • Comment on Re: Consise way to filter out keys with undef values from a hash slice?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-18 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found