bory has asked for the wisdom of the Perl Monks concerning the following question:
So when my array is not empty I want to put it in $test using join if is empty I don't need it. I relly don't know how to make this selection. Thank you very much for your time.@a,@b,@c,@d,@e,@f,@g if(@a){my $test=join(',',@a)} else{ @a is empty I don't put it in $test} if (@a and @b and @c){my $test=join(',',@a).'and'.join(',',@b).'and'.j +oin(',',@c)}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array testing
by TomDLux (Vicar) on Oct 30, 2003 at 15:28 UTC | |
|
Re: array testing
by Roy Johnson (Monsignor) on Oct 30, 2003 at 17:24 UTC | |
|
Re: array testing
by erasei (Pilgrim) on Oct 30, 2003 at 15:31 UTC | |
by Roy Johnson (Monsignor) on Oct 30, 2003 at 17:06 UTC | |
by chromatic (Archbishop) on Oct 30, 2003 at 17:10 UTC | |
by bart (Canon) on Oct 31, 2003 at 02:21 UTC | |
|