From: Daniel Bretoi Date: 2003-12-18T04:23:46+09:00 Subject: gsub question perl -e '$a="hello hi hello";$a =~ s/(\w+)/$1a/g;print $a; ' helloa hia helloa ruby -e 'a="hello hi hello";a.gsub!(/(\w+)/,"#{$1}a"); puts a' a a a Why? I'm expecting the same result as in perl. ruby -e 'a="hello hi hello";a.gsub!(/(\w+)/) { |k| k = k + "a"}; puts a' helloa hia helloa does however work. Can someone try to explain why the first doesn't work? db -- A.D. 1844: Samuel Morse invents Morse code. Cryptography export restrictions prevent the telegraph's use outside the U.S. and Canada.