Hi James,

I was trying this but not sure where it is going wrong ...

use strict;
use File::Copy;

my $dest_file = "sendToAdapter.properties";
my $searchstr = 'sample';
my $repstr    = 'FileAdapter';

open(FL, $dest_file) or die("Doh - $!");

$^I = '~';
s/$searchstr/$repstr/g while <FL>;

close(FL);

Would appreciate if you could help me.

Thanks & Regards,
Anand




-----Original Message-----
From: James Edward Gray II [mailto:[EMAIL PROTECTED]
Sent: Friday, July 23, 2004 6:18 PM
To: [EMAIL PROTECTED]
Subject: Re: How do it do find and replace specific words using perl 


On Jul 23, 2004, at 5:13 AM, [EMAIL PROTECTED] wrote:

> Hi All,

Hello.

> Could some help me in doing this using perl.

We will "help", yes, but we probably won't write it for you.  What have 
you tried.  Where are you stuck?  Show us some code.

James

Reply via email to