in reply to perl equivalent of python's underscore?

Another way is to use an array slice:
use strict; use warnings; my ($x, $z) = (split /,/, '7,8,9')[0,2]; print "$x $z\n"; __END__ 7 9

I had to change your code because it did not compile for me. Take a look at split.