Help for this page

Select Code to Download


  1. or download this
    open my $fh1, '<', 'file1.txt' or die "can't open the damned 'file1.tx
    +t' file!: $!";
    open my $fh2, '<', 'file2.txt' or die "can't open the bloody 'file2.tx
    +t' file!: $!";
    
  2. or download this
    my @file = <$fh>;
    
    foreach $row (@file){
        ...
    
  3. or download this
    while (my $row = <$fh>){
        chomp $row; # remove line ending
        ...