use strict; use warnings; my @FieldNames = ( 'One' , 'Two' , 'Three' , 'Four' , 'Five' ) ; my $Foo = join(($_ eq 'One' ? '1' : 'n'), @FieldNames); print("\$Foo\[$Foo\]\n");
In reply to join using different delimiter for first element of list by NateTut
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |