Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print '--- my   %a before ---',"\n", Dumper \%a;
    undef @a{@b};
    print '--- my   %a after ---',"\n", Dumper \%a;
    
  2. or download this
    --- my   @a before ---
    $VAR1 = [
    ...
              'd' => undef
            };
    
  3. or download this
    if @a = (1,2,3), then undef @a[1,2] is proper, undefines $a[2]
    just undef @b[2], is giving me @b's 0 ,1 and 2 indexes to be undef.
    if %hash = qw(a b c d) then  undef @hash{qw(a c)} is proper, undefines
    + only $hash{c}
    just undef @hash1{qw(a c}} is giving me the values of the keys a and c
    + to be undef