in reply to Construct Key by split

The "EXPR" in "(split ...)[EXPR]" must be

an expression that returns a list of indexes.

In your code, you have

an expression that returns source code that once compiled and executed returns a list of indexes.

Solution:

my $prodKey = join("|",(split/\|/,$$prodRef[$a])[@arrofIndices]);

By the way, $$prodRef[$a] is more readable as $prodRef->[$a]. See Dereferencing Syntax.

Replies are listed 'Best First'.
Re^2: Construct Key by split
by libvenus (Sexton) on Sep 10, 2008 at 11:31 UTC

    Thanks all for help !!!