in reply to appending arrays
#!/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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: appending arrays
by ysth (Canon) on Nov 20, 2003 at 00:40 UTC |