FAQ
You can probably achieve this easily with 'sed' on bash.
On 28 Jan 2016, at 09:37, Frank Larry wrote:

Hi Team,

could you please let me? i have a file which contains "Debug", i would like to replace debug to "Error", when i ran the below program the out showing Error message but how to save the output with new changes. Could you please tell me how to fix it?

open(FILE, "<filter.txt") or die "Can’t open $!\n";

while($line = <FILE>){
print "Before substituting: ", $line ,"\n";
$line =~ s/Debug/Error/g;
print "After substituting : ", $line , "\n";

}

close(FILE);


-Franky

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 22 | next ›
Discussion Overview
groupbeginners @
categoriesperl
postedJan 28, '16 at 9:37a
activeFeb 3, '16 at 3:13a
posts22
users12
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase