s/XXYY/\$foo/; [download]
In reply to Re: s/this/$that/ Gives Variable Name, Not Contents of Variable by toolic in thread s/this/$that/ Gives Variable Name, Not Contents of Variable by itisrich