From: sto.mar@... Date: 2012-10-02T22:23:03+09:00 Subject: Re: need help to fix syntax problem for cgi Am 02.10.2012 14:47, schrieb Ferdous ara: > Hi bellow is the script. ^^^^^^ > I think its failing at > > if #{f['name']} =~/asw1-v2r7c9-bry/ > brydc << #{f['name']} > end You should use irb to try out code snippets. 1.9.3-p194 :001 > value = 'a hash value' => "a hash value" 1.9.3-p194 :002 > array = [] => [] 1.9.3-p194 :003 > array << #{value} 1.9.3-p194 :004 > puts array SyntaxError: (irb):4: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' from ......./irb:16:in `
' #{} is supposed to be used inside double quotes. Assuming your hash values are strings, just remove it. if f['name'] =~ /asw1-v2r7c9-bry/ brydc << f['name'] end --