I would like to create an array in Perl that will have for name the values of two variables and, one of the two variables will have a value that is read from a file.
In the simplified case, how can I create an array with name CCP
when P
and CC
are two separate variables?
So far I have joined the two using:
my $body='CC';
my $letter='P';
my $joined=$body . "$venue";
but I would like to actually create an array with name @CCP
. The idea is that I will read different letters from a data file and then create the arrays that will have names given by joining 'CC' to the letters read from file.