$ perl -le"%h=map { $_=>$_ } qw(a b c d e); undef @h{qw( c d )}; print qq{$_: $h{$_}} for sort keys %h" a: a b: b c: c d: e: e