$ cat foo.pl use strict; use warnings; use List::MoreUtils qw(natatime); my @t = qw(name John number 7 status unknown); my @u; my $it = natatime 2, @t; while (my @vals = $it->()) { push @u, join("=",@vals); } print join("&",@u),"\n"; $ perl foo.pl name=John&number=7&status=unknown