in reply to Joining array with elements of another array
use warnings; use strict; use List::MoreUtils qw(mesh); my @arrOfJoiners = ('!','*','?'); my @arrToJoin = (1,2,3,4); my @arr2 = mesh(@arrToJoin, @arrOfJoiners); pop @arr2; print join('', @arr2), "\n"; __END__ 1!2*3?4
Maybe the source code for mesh will give you other ideas.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Joining array with elements of another array
by davido (Cardinal) on Mar 18, 2013 at 16:07 UTC |