Robert Klemme wrote: > On 07.01.2008 19:06, Peter Bailey wrote: >> >> I get this from Ruby: >> sizer.rb:10: undefined method `to_f' for [["5100"]]:Array >> (NoMethodError) > > Your error is in using #scan (see the docs for details). > > This works better > > width = info[/Image Width: ([0-9]{1,5})/, 1].to_f > ... > > Cheers > > robert Thank you very much. Yes, that works perfectly. That whole square bracket thing you use there is new to me. When you say "see the docs," what should I look for? For "String#scan" or for Regex. . . .? -- Posted via http://www.ruby-forum.com/.