Re: Find and replace a word or characater in a the same file.

2002-04-12 Thread John W. Krahn
Guan boon lee wrote: > > I would like to find a word or character in a file and > replace it with another word or character, while > leaving others untouched. Currently, I am using the > following method > > #!/bin/perl -Dr -w > open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]: > $!\n"; > open

RE: Find and replace a word or characater in a the same file.

2002-04-12 Thread David Gray
> I would like to find a word or character in a file and > replace it with another word or character, while > leaving others untouched. Currently, I am using the > following method > > #!/bin/perl -Dr -w > open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]: > $!\n"; > open(FILE2,">$ARGV[0].spi")

Re: Find and replace a word or characater in a the same file.

2002-04-12 Thread bob ackerman
On Friday, April 12, 2002, at 09:09 AM, Guan Boon Lee wrote: > I would like to find a word or character in a file and > replace it with another word or character, while > leaving others untouched. Currently, I am using the > following method > > #!/bin/perl -Dr -w > open(FILE,"$ARGV[0]") || di

Find and replace a word or characater in a the same file.

2002-04-12 Thread Guan Boon Lee
I would like to find a word or character in a file and replace it with another word or character, while leaving others untouched. Currently, I am using the following method #!/bin/perl -Dr -w open(FILE,"$ARGV[0]") || die "Can't open $ARGV[0]: $!\n"; open(FILE2,">$ARGV[0].spi") || die "Can't open