There's something fishy about $_. It's a TEMP with REFCNT=1. I believe that means it's a mortal. If so, that means noone claims a reference to $_, but first still uses it after the callback returns. This points to a bug in List::Util.
That said, the inplace lc($_)[1] should probably only happen in void context.
In reply to Re^3: Strange behavior with List::Util qw{first} on perl >= 5.20
by ikegami
in thread Strange behavior with List::Util qw{first} on perl >= 5.20
by papioko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |