http://qs321.pair.com?node_id=11117578


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;