Apache is a modular server. This implies that only the most basic functionality is included in the core server. is it so ?
On this file , when I use following code
open(file, "apache.txt") ;
@modify = <file> ;
print @modify ;
foreach(@modify){
chomp($_);
$_ =~ s/\bis\b/are/g ;
# $_ =~ s/^is$/are/g ;
}
print @modify ;
This will replace 'is" with 'are' which I tested correcty. Now when I comment out "$_ =~ s/\bis\b/are/g ;" and uncomment "$_ =~ s/^is$/are/g ;" ,'is' will not be replaced by 'are' , which was my original problem. As ^ will look at the beginning of string and $ will look at the end of string.
If I add 'is' at the beginning and end of the string, will then 'is' be replaced with 'are' in the string ?
is Apache is a modular server. This implies that only the most basic functionality is included in the core server. is it so ? is If I use regex "$_ =~ s/^is$/are/g ;" on this text, will it replace 'is' with 'are' as this string has 'is' at the beginning and end as well, which satisfies the regex condition.
I tried, but it did not replace is with 'are'. So why did it not replace 'is' with 'are' ?