Help for this page

Select Code to Download


  1. or download this
    my @a
    
  2. or download this
    my @new_a;
    for my $i (0..$#a){
    ...
    }
    @a = @new_a;
    @new_a = ();
    
  3. or download this
    my @a = ("bob", "bob", "martha", "bob");
    for my $i (0..$#a){
    ...
    }
    #@a is now ("bob", "martha"), but I don't want any "bob"s;
    #also I get harassed about uniniatialized values when I use warnings