in reply to Joining an array
The List::MoreUtils library has the function natatime that helps things like this. Example:
$ 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
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Joining an array
by tangent (Parson) on Feb 11, 2012 at 00:48 UTC |