Help for this page

Select Code to Download


  1. or download this
    %b = map { $_ => 1 }
         grep defined, @a;
    
  2. or download this
    %b = map { defined ? ($_ => 1) : () } @a;
    
  3. or download this
    @a = qw( a b c d );
    
    ...
    splice(@a, 2, 1);
    
    print("\@a has ", scalar(@a), "elements.\n");