in reply to Re^3: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
in thread Perl Idioms Explained - keys %{{map{$_=>1}@list}}
Undefines the value of EXPR, which must be an lvalue... Saying undef $hash{$key} will probably not do what you expect...That is, taking "undef EXPR" as (usually) equivalent to "EXPR = undef", the behavior is sensible, even expected. At any rate, a warning seems inappropriate, as this feature is long-standing:
$ perl -le 'undef @h{qw|a b c|}; print "$]: ", join " ", keys %h' 5.00404: a b c
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Perl Idioms Explained - keys %{{map{$_=>1}@list}}
by Roy Johnson (Monsignor) on Mar 02, 2005 at 12:19 UTC | |
by pilcrow (Sexton) on Mar 02, 2005 at 15:58 UTC | |
by Roy Johnson (Monsignor) on Mar 02, 2005 at 16:11 UTC |