Help for this page

Select Code to Download


  1. or download this
    open my $ifh, '<', $filename or die "$filename: $!";
    chomp( my @array = <$ifh> );
    ...
    open my $ofh, '>', $filename or die "$filename: $!";
    print $ofh $_,"\n" for @array;
    close $ofh;
    
  2. or download this
    use File::Replace;
     
    ...
        print {$repl->out_fh} $line, "\n";
    }
    $repl->finish;