Help for this page

Select Code to Download


  1. or download this
    open my $file1,"<","1.txt" or die "1.txt: $!\n";
    open my $file2,"<","2.txt" or die "2.txt: $!\n";
    open my $w1,">","3.txt" or die "3.txt: $!\n";
    open my $w2,">","4.txt" or die "4.txt: $!\n";
    
  2. or download this
    while (
      defined(my $line1=<$file1>) and defined(my $line2=<$file2>)
    ...
      print $w2 "$line2\n";
     }
    }