gping: avoid using lexical $_

This fixes the "Use of my $_ is experimental" warning in perl 5.18.