Hi,
I'm trying to make substitutions in a file. My substitution should only
take affect on exact matches only. below is my code:
******** Start of Code ***************
$oldWord = "Orange";
$newWord = "Apple";
$^I=".bk";
while (<>) {
$_ =~ s/$oldWord/$newWord/g;
print;
}
******** End of Code ***************
This code replaces any occurance of "Orange" so the word "MyOrange" will be
changed to "MyApple". I would like to change this so that "Orange" is the
only one that is replaced by the string "Apple".
Thanks in advance.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users