in reply to Compare two file text input, compare it, replace and write new file
my @words = split / /, $s;
# match a backslash followed by two characters, # then compute the replacement by looking into %words $s =~ s{(\\..)}{ $words{$1} || $1 }ge;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compare two file text input, compare it, replace and write new file
by wa2nlinux (Novice) on Feb 14, 2012 at 23:30 UTC |