$string = "good food"; $string =~ s/o*/e/;print $string;
-
geod food
-
geed food
-
geed feed
-
egood food
D
Correct answer
Explanation
The regex s/o*/e/ matches zero or more 'o' characters. At the start of 'good food', it matches zero 'o's (empty string before 'g') and replaces with 'e', producing 'egood food'. This is because * is greedy but matches zero characters when anchored at start. The other options misunderstand how the * quantifier works.