in reply to Re: Need to replace string from external file
in thread Need to replace string from external file
use strict; use warnings; use Path::Tiny qw(path); my $filenme='d:\SampleCiscoIOSEvent.txt'; my $file=path($filenme); my $data= $file->slurp_utf8; use File::Slurp; my $filename='e:\filename.txt'; my @arr = read_file($filename); my @output= map{ $data=~s/C_USERNAME/$_/rg} @arr; print @output;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need to replace string from external file
by marto (Cardinal) on Nov 06, 2017 at 11:49 UTC | |
by bhupi70007 (Novice) on Nov 06, 2017 at 11:55 UTC | |
by marto (Cardinal) on Nov 06, 2017 at 11:56 UTC | |
|
Re^3: Need to replace string from external file
by 1nickt (Canon) on Nov 06, 2017 at 12:10 UTC | |
|
Re^3: Need to replace string from external file
by bhupi70007 (Novice) on Nov 06, 2017 at 11:44 UTC | |
by bhupi70007 (Novice) on Nov 06, 2017 at 11:53 UTC |