I am trying to change a row using Regex and a hash table containing the changes. I use the following code to change:
foreach $key (keys %{$hash{$sub_hash}}){
$line =~ s/$key/$hash{$csub_hash}{$key}/g;
}
And my hash:
$hash{sub_hush_a}={
"\\mi2ie..." => "\\RSUop...",
"iereset..." => "\\agres...",
};
The problem is that for the first pair in the data set, when it ever changes, it \is placed instead \\, and for the second - only one, as expected.
It also gives me an error:
Unrecognized escape \m passed through. What's wrong?
Explanation: There are no dots in the names in the program, names are longer than me, and they all contain only letters and numbers. points here to cut.
EDIT:
The problem resolves (double \and error message) if I change the fist pair:
"mi2ie..." => "RSUop...",(delete \\).
, , , .