From: "John W. Long" Date: 2006-11-25T21:24:30+09:00 Subject: Re: Problem using #{...} in eval Richard wrote: > #3: Can't find the elements of the match > show(%Q@require 'bigdecimal' > require 'bigdecimal/math' > include BigMath > BigMath::PI(6).to_s =~ /.(.)(.)(.{5})/ > "result = " + "#{$2}#{$1}#{$3}" > @) You need to escape the # signs with a slash: show(%Q@require 'bigdecimal' require 'bigdecimal/math' include BigMath BigMath::PI(6).to_s =~ /.(.)(.)(.{5})/ "result = " + "\#{$2}\#{$1}\#{$3}" @) -- John Long http://wiseheartdesign.com