#!/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;
In reply to Re: Consise way to filter out keys with undef values from a hash slice?
by tybalt89
in thread Consise way to filter out keys with undef values from a hash slice?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |