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;
In reply to Re: Editing Contents of a File
by ColtsFoot
in thread Editing Contents of a File
by bivouac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |