iamcal has asked for the wisdom of the Perl Monks concerning the following question:
@a = ('a','b','c'); @b = ('1','2','3'); #we want ('a-1','b-2','c-3') @a = map{$_="$_-".shift@b}@a; print "@a";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Combining Arrays
by srawls (Friar) on May 20, 2001 at 19:18 UTC | |
|
Re: Combining Arrays
by kschwab (Vicar) on May 20, 2001 at 19:15 UTC | |
|
Re: Combining Arrays
by premchai21 (Curate) on May 20, 2001 at 20:32 UTC | |
|
Re: Combining Arrays
by davorg (Chancellor) on May 21, 2001 at 15:33 UTC | |
|
Re: Combining Arrays
by jeroenes (Priest) on May 21, 2001 at 15:49 UTC | |
|
(tye)Re: Combining Arrays
by tye (Sage) on May 21, 2001 at 19:58 UTC | |
by iamcal (Friar) on May 21, 2001 at 22:58 UTC | |
|
Re: Combining Arrays
by Big Willy (Scribe) on May 21, 2001 at 06:22 UTC |