in reply to Changing arrays w/ and w/o regex

You want

$_ = lc for @x;
or
@x = map lc, @x;

lc has no side effects. Its only effect is the value it returns. As such, it makes no sense to use it in void context, so it warns.

s/// has the side effect of modifying the bound variable. The value it returns is but one of its effects. It not only makes sense to use it in void context, it's a common thing to do. It wouldn't make sense to warn.

s///r has no side effects, so it too warns in void context.

lc($_); # No effect. void warning $_ = lc($_); # Modifies $_. no warning s/.*/lc($_)/e; # Modifies $_. no warning s/.*/lc($_)/er; # No effect. void warning $_ = s/.*/lc($_)/er; # Modifies $_. no warning