#!/usr/bin/perl use strict; use warnings; sub zip (\@\@) { map {"${$_[0]}[$_]${$_[1]}[$#{$_[0]}-$_]"} 0 .. $#{$_ [0]} } my @array1 = qw /lots of nice words/; my @array2 = qw /red clothes are fun/; my @array3 = zip @array1, @array2; print "@array3\n"; __END__ lotsfun ofare niceclothes wordsred
Abigail
In reply to Re: appending arrays
by Abigail-II
in thread appending arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |