You can probably achieve this easily with 'sed' on bash. 

> On 28 Jan 2016, at 09:37, Frank Larry <frankylarry2...@gmail.com> 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

Reply via email to