Help for this page

Select Code to Download


  1. or download this
    @array = map { EXPR } LIST;
    
  2. or download this
    @array = ();
    foreach (LIST) {
       push @array, EXPR;
    }
    
  3. or download this
    open (FH, "foo.txt");
    my @words = map { split } <FH>;
    close FH;
    print "@words\n";
    
  4. or download this
    open (FH, "foo.txt");
    my @words;
    ...
    }
    close FH;
    print "@words\n";
    
  5. or download this
    open (FH, "foo.txt");
    my @words;
    ...
    }
    close FH;
    print "@words\n";