foreach (0 .. @a.""-1) { $a[$_] = $a[$_] . '-' . $b[$_]; }