NateTut has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; my @FieldNames = ( 'One' , 'Two' , 'Three' , 'Four' , 'Five' ) ; my $Foo = join(($_ eq 'One' ? '1' : 'n'), @FieldNames); print("\$Foo\[$Foo\]\n");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: join using different delimiter for first element of list
by kennethk (Abbot) on Dec 07, 2010 at 21:10 UTC | |
by GrandFather (Saint) on Dec 08, 2010 at 01:49 UTC | |
|
Re: join using different delimiter for first element of list
by AR (Friar) on Dec 07, 2010 at 21:14 UTC | |
|
Re: join using different delimiter for first element of list
by hbm (Hermit) on Dec 09, 2010 at 18:32 UTC | |
|
Re: join using different delimiter for first element of list
by AnomalousMonk (Archbishop) on Dec 08, 2010 at 09:55 UTC | |
|
Re: join using different delimiter for first element of list
by NateTut (Deacon) on Dec 09, 2010 at 17:56 UTC |