I basically gave up on perl after discovering this:
foo foreach @bar;
sub foo {
s/foo/bar/
print;
}
This clobbers the content of @bar due to mutating the $_ variable.
Which is a useful feature. But imagine that foo, instead of directly mutating the value passed to it, calls into a complex set of other code. Now you have a bomb where working code can break in crazy ways if any of it gets changed to modify $_.Having to audit code for this kind of thing is a real pain. I still maintain existing perl projects, but won't be starting any new ones.