Am 05.03.2013 21:40, schrieb Bob Ford:
> unknown wrote in post #1100227:
>> Am 05.03.2013 19:07, schrieb Bob Ford:
>>> Hmmm, The files are entered from the command line using a getopt (e.g -f
>>> "file1 file2 file3").
>>>
>>> I'll look into this some more.  Thank you.
>>>
>>
>> "file1 file2 file3".split

Note that split is not part of the string,
but a method sent to the string!

>
> I invoke this script from the commandline like such
>
> ruby TelnetCmds.rb -h 192.168.1.10 -f "C:\{PATH_TO_FILE}\File1
> C:\{PATH_TO_FILE}|File2"
>
> I've been trying to convert that string to an array but I get the same
> error.
>
> filenames = "#{$file_arg}.split(" ")"

Do you use irb to actually see what your code is doing?
You really should:

2.0.0-p0 :001 > file_arg = "file1 file2 file3"
  => "file1 file2 file3"
2.0.0-p0 :002 > "#{file_arg}.split(" ")"
  => "file1 file2 file3.split()"


-- 
<https://github.com/stomar/>