in reply to perl equivalent of python's underscore?
use strict; use warnings; my ($x, $z) = (split /,/, '7,8,9')[0,2]; print "$x $z\n"; __END__ 7 9 [download]
I had to change your code because it did not compile for me. Take a look at split.