From: "F. Senault" Date: 2007-07-19T21:15:00+09:00 Subject: Re: identify and extract positions from a string - how to? Le 19 juillet � 13:16, Marc Hoeppner a �crit : > and uses it in the extraction method > > file.readlines each do |l| > puts string[l] > end The others solutions in the thread are the ones to use, but I feel the need to suggest the very dirty / insecure / bad one : File(filepath).readlines.each do |l| puts string[eval(l)] end Don't try this at home, etc... :) (But, in a controlled environment, it may be useful since it allows for all the variations that can be evaluated in one line of ruby code...) Fred -- I don't need no arms around me I don't need no drugs to calm me I have seen the writing on the wall Don't think I need anything at all No, don't think I'll need anything at all (Pink Floyd, Another Brick in The Wall part 3)