Help for this page

Select Code to Download


  1. or download this
    e.g.
    
    my @numbers = ('1', '2', '2', '3', '3');
    my @strings = ('hello', 'green', 'grass', 'rainbow', 'pretty');
    my @new_strings;
    
  2. or download this
    hello
    greengrass
    rainbowpretty
    
  3. or download this
    for ( 0 .. $#numbers ) {
      push @{$h{$numbers[$_]}}, $strings[$_];
    ...
                           push @final_strings, "$new_strings[$k]";
                  }
    }
    
  4. or download this
    @check = ('1','2','3','4');
    
    ...
    rainbowpretty
    xxxxxxxx       # THE 4TH ELEMENT NOW CONTAINS 'xxxxxxxx' as there isn'
    +t a '4' in @numbers