$line =~ s/\Q$node/$newnode/ [download]
In reply to Re^3: Replacement of Bracketed Expressions for JSON output by ikegami in thread Replacement of Bracketed Expressions for JSON output by Ardii