Handle a warning when setting to $_:

Perl 5.18 doesn't like us setting $_, so we change it to a more
explicit - yet not as nice - code.