The_Last_Monk has asked for the wisdom of the Perl Monks concerning the following question:
open my $file, $firstTextFile or die "Unable to open"! while(<$file>){ if($_ =~ /hue/){ $_ =~ s/hue/someword/g; // How do i now write to a text file all the previous things in the fi +rst text file except for the word hue being replaced with the word so +meword in the new text file? } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing all relevant data in one file to a new file with adjustments
by pme (Monsignor) on Feb 08, 2015 at 20:43 UTC | |
|
Re: Writing all relevant data in one file to a new file with adjustments
by Laurent_R (Canon) on Feb 08, 2015 at 22:09 UTC |