my $regex = $EVENTS[$A]{Alarm}[$B]{RegExpMapping}[0]; $regex =~ s/\\\\/\\/g; $EVENTS[$A]{Alarm}[$B]{RegExpMapping}[0] = $regex;