From: Matthew Margolis Date: 2004-09-28T06:39:26+09:00 Subject: keep changes in string outside of scope? The code below is supposed to scan through a string and put a ',' before all zip codes. The code properly detects the zip codes and makes the change in x but the change is never reflected in thestring. How can I get these changes to exist outside of x's scope? thestring.each do |x| if x =~ /\d{5}/ puts "match" x[-6] = "," puts x end end Thank you, Matthew Margolis