From: Joel VanderWerf Date: 2003-03-12T05:05:15+09:00 Subject: Re: when a ruby script gets arguments passed to it..... Seth Kurtzberg wrote: > In general, the best syntax (IMHO, of course) is the extract each argument > from the input list using ARGV.shift. Other methods for accessing members of > a string array can also be used. If the args are non-positional and do not contain whitespace, you can use ARGV.delete: foo_option = ARGV.delete('-foo') bar_option = ARGV.delete('-bar') ARGF.each {|line| ... # treat remaining args as files } Of course, this fails if your files are named -foo or -bar...