Toby Rodwell wrote: > I would like to build a hash from ARGV using UNIX type notation ie any > argument which begins with a hyphen or double hyphen is an option and > may have as value(s) the argument(s) which succeed it (if they don't > have hyphens). Options without values should result in a hash element > which has a key and a dummy value (say "0"). Take a look at optparse.rb in the standard ruby library: http://ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html Then if you don't like that, there are several other libraries that other people have written with more "object like" APIs and very forgettable names. One I came across recently was thor: http://github.com/wycats/thor -- Posted via http://www.ruby-forum.com/.