in reply to Only joining elements of an array that are defined
I can't help you with that code, there are two joins and so many undefined variables that trying to understand what you intend is hopeless.
However the following snippet may help resolve your problem:
use strict; use warnings; my @array = (1, 2, undef, 4, 5, undef, undef, 8, 9); print join ' ', grep $_, @array;
Prints:
1 2 4 5 8 9
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Only joining elements of an array that are defined
by tirwhan (Abbot) on Feb 14, 2006 at 10:34 UTC | |
by GrandFather (Saint) on Feb 14, 2006 at 10:38 UTC | |
by Anonymous Monk on Feb 14, 2006 at 10:49 UTC | |
by tirwhan (Abbot) on Feb 14, 2006 at 11:11 UTC | |
by Fletch (Bishop) on Feb 14, 2006 at 14:19 UTC | |
by blazar (Canon) on Feb 15, 2006 at 09:55 UTC | |
by Anonymous Monk on Sep 15, 2018 at 09:52 UTC | |
|