http://www.perlmonks.org?node_id=256808


in reply to avoiding the hash

You can put them into a string:
$array[0] . "|" . $array2[0]

Or you can put them into an array:

my $newarray[0] = [$array[0], $array2[0]];

Update: Got rid of the escape function: they are just numbers. Got rid of the temporary variable.