in reply to selective join
If @array has a variable size, you'll have to figure out the odd indices on the fly:my $desc = join "_" => @array[1,3,5];
You can also get odd indices this way too, but not as elegantly as with grep:my $desc = join "_" => @array[ grep { $_ % 2 } 0 .. $#array ];
my $desc = join "_" => @array[ map { 2*$_ + 1 } 0 .. (@array/2)-1 ];
blokhead
|
|---|