From: Peter Bailey Date: 2006-11-30T02:37:55+09:00 Subject: Re: Need a range, but not getting it. . . . Paul Lutus wrote: > Peter Bailey wrote: > >> Hello, >> I'm going nuts with the simplest stuff here. I just want to take in >> array data and make it into a range. >> >> Here's my test script, called test1.rb: >> files = [ARGV] > > ARGV is an array, not a scalar. you want: > > files = ARGV[0] > > Or maybe you want to go through the ARGV values one by one. > >> files.to_s.gsub!(/\-/, "..") >> puts files > > This code works if you provide a scalar. > > Please explain. Will there be more than one value on the command line? Yes, there may be more than one argument, and, it won't be consistent as to how many. There could be 3, 4, 5, whatever. That's why I was just blobbing all of them into ARGV and then trying to break them down from there. Thanks. -- Posted via http://www.ruby-forum.com/.