in reply to Construct Key by split
Something like:
use strict; use warnings; my @arrofIndices = (1, 3); my $str = 'Zeroth|First|Second|Third'; my $prodKey = join "|", (split /\|/, $str)[@arrofIndices]; print $prodKey [download]
Prints:
First|Third [download]