Help for this page

Select Code to Download


  1. or download this
    print FILE for @lines;
    
    ...
    foreach my $line (@lines) {
        print FILE $line
    }
    
  2. or download this
    print FILE "$_\n" for @lines;
    
    ...
    foreach my $line (@lines) {
        print FILE "$line\n";
    }
    
  3. or download this
    print OUTPUT_FILE while <INPUT_FILE>;
    
    ...
        # manipulation of $line goes here.
        print OUTPUT_FILE $line;
    }