By far the most efficient way to do a global in line replacement on an array is by using the following substitution one liner:
s/apples/oranges/ for @entries;
Why go through all of the trouble of using a for
loop when you can impress your family and friends by doing it so much more elegantly?