open(file, "apache.txt") ; @modify = ; print @modify ; foreach(@modify){ chomp($_); $_ =~ s/\bis\b/are/g ; # $_ =~ s/^is$/are/g ; } print @modify ;