On Thu, 28 Sep 2006, greg wrote:

> thanks, a
>
> This kind of sucks though.

why?  is this hard?

   stdin = ARGV.delete '-'

> apparently in perl, if there is a piped input, '-' will show up
> automatically in ARGV.  I think I will propose this change to Ruby.

eeeks!  that's is pure __evil__!

consider  i have many, many programs which do things like

   convert infile outfile
   convert - outfile       # infile on stdin
   convert infile -        # outfile on stdout
   convert - -             # infile on stdin, outfile on stdout
   convert --infiles=-     # list of infiles on stdin, auto-name outfiles

this is standard unix practice (do a man on gzip, tar, etc).  now, if ruby
just started willy nilly adding a '-' to the command line this technique would
not work because it's not just the existence of '-' but the __position__ of it
which can have meaning.

auto-munging of ARGV is a bad idea imho.

regards.

-a
-- 
in order to be effective truth must penetrate like an arrow - and that is
likely to hurt. -- wei wu wei