From: keinlezard Date: 2011-05-21T04:45:30+09:00 Subject: Re: need help with "module" and variable Le 17/05/2011 23:57, 7stud -- a 辿crit : > Don't use global variables--ever. > I understand that ... what I want to know... Is how make that without this damned global variables .... It seems to me that my code do not use global variable ... I meet this kid of problem when I try to write > query_tab_propriet="select id, label from sparc.proprietaire order by label asc" > sth=dbh.execute(query_tab_propriet) > def funct(sth) > sth.fetch{|k,v| > output="" > } > end > > output+=funct(sth) to replace > query_tab_propriet="select id, label from sparc.proprietaire order by label asc" > sth=dbh.execute(query_tab_propriet) > sth.fetch{|k,v| > output+="" > } > I know that an horrible code ... in fact that is just another test ... that produce same problem than my other chunk of code ...