I'm trying to figure out how to do string substitutions while in the process of porting a Perl script to Ruby.
Here's the Perl line. I'm trying to figure out Ruby's equivalent:
$historyURL =~ s/COMPONENT_NAME/$componentName/g;
For those of you who may know Ruby, but not Perl, this line basically substitutes the string "COMPONENT_NAME" in the $historyVariable
with the value of the $componentName
variable.