Re: Anyone using Ruby for scripting?

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Mon, 20 Sep 2010 20:16:09 +0200
Message-ID: <4C97A4E9.9070102_at_gmail.com>


> On Mon, Sep 20, 2010 at 6:29 AM, Blanchard, William G
> <William.Blanchard_at_fisglobal.com
> <mailto:William.Blanchard_at_fisglobal.com>> wrote:
>
> I can write a perl one-liner that edits a file but can’t, from
> within a perl script, directly edit a file.
>
>

You can:

{

   local ($^I, _at_ARGV) = ('', 'your_file');    while (<>)

     {
       s/current/new/;
       print;
       }

   }

Regards
Dimitre

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Sep 20 2010 - 13:16:09 CDT

Original text of this message