in reply to Consise way to filter out keys with undef values from a hash slice?
#!/usr/bin/perl use warnings; use strict; use Data::Dumper; my %args = (profile => 'foo'); my %ta = %args{ grep exists $args{$_}, qw( profile user password ) }; print Dumper \%ta;
|
|---|