From: Chad Perrin Date: 2012-05-16T02:31:02+09:00 Subject: Re: Option Parser with an optional flag/switch for last argument On Wed, May 16, 2012 at 12:03:07AM +0900, Neubyr Neubyr wrote: > I am using OptionParser to parse command-line options. I would like to > run a program in following manner: > > $ multiply-by.rb --factor 3 4 > $ 12 > > where last number '4' is an input argument which should not need any > option flag/switch. Any hints on how can it be done? Is it possible with > OptionParser or should I write my own option parser method? You could just access it directly in ARGV after parsing everything else using OptionParser. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]