Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by tybalt89 (Prior)
on Jun 01, 2020 at 22:31 UTC ( #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
Node Status?
node history
Node Type: note [id://11117578]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-10-29 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (269 votes). Check out past polls.

    Notices?