in reply to Editing Contents of a File
Hope this helps#!/usr/bin/perl -w use strict; open INPUT, 'your_input_fiel.txt'; open OUTPUT '>your_output_file.txt'; while (my $line = <INPUT>) { chomp $line; $line =~ s/hello/goodbye/gi' print <OUTPUT> $line; } close INPUT; close OUTPUT;
|
|---|