From: "Peña, Botp" Date: 2008-06-13T14:53:37+09:00 Subject: Re: array to string conversion fr [mailto:clement.ow@asia.bnpparibas.com] # All i managed to convert is(using .to_s): # str[0] = "xlsini20080326" # str[1] = "gifxlsrb" # but i want to convert each array into a string, something like # str[0] = "xls,ini,20080326" # str[1] = "gif,xls,rb" botp@botp-desktop:~$ qri array.join ------------------------------------------------------------- Array#join array.join(sep=$,) -> str ------------------------------------------------------------------------ Returns a string created by converting each element of the array to a string, separated by sep. [ "a", "b", "c" ].join #=> "abc" [ "a", "b", "c" ].join("-") #=> "a-b-c" botp@botp-desktop:~$ irb irb(main):003:0> ex[0] = ["xls", "ini", "20080326"] => ["xls", "ini", "20080326"] irb(main):005:0> str[0]=ex[0].join(",") => "xls,ini,20080326" kind regards -botp