On Tue, 25 Mar 2003, Yukihiro Matsumoto wrote:

> % man ruby
>
>     ....
>
>      -i extension
>          Specifies in-place-edit mode.  The extension, if specified, is added to old filename to make a
>          backup copy.  For example:
>
>                % echo matz > /tmp/junk
>                % cat /tmp/junk
>                matz
>                % ruby -p -i.bak -e '$_.upcase!' /tmp/junk
>                % cat /tmp/junk
>                MATZ
>                % cat /tmp/junk.bak
>                matz
>
>      ....

this is what i *thought* was meant by 'in-place', but many, many, threads have
discussed $defout simply as a means of redirecting/dupping/etc the stdout of a
process.

is this an abuse then?  it would seem so since it looks as if

  if '-p' and '-i' and ARGV[0]
    $defout = open ARGV[0], 'w'
  else
    $defout == $stdout
  end

??

is there ever a good reason to directly modfiy $defout directly then?

-a

--
  ====================================
  | Ara Howard
  | NOAA Forecast Systems Laboratory
  | Information and Technology Services
  | Data Systems Group
  | R/FST 325 Broadway
  | Boulder, CO 80305-3328
  | Email: ahoward / fsl.noaa.gov
  | Phone:  303-497-7238
  | Fax:    303-497-7259
  ====================================