c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my %args = ('profile' => 'foo', 'xyzzy' => undef, 'status' => 0); my %ta = map { defined $args{$_} ? ($_ => $args{$_}) : () } qw(profile password xyzzy status) ; dd 'filtered', \%ta; dd 'original', \%args; " ("filtered", { profile => "foo", status => 0 }) ("original", { profile => "foo", status => 0, xyzzy => undef })