I am trying to do some thing like this:
my @Amode=('1','2','3');
my @Bmode=('1','2','3');
my @Cmode=('1','2','3');
my @Atemp=('1','2','3');
my @Btemp=('1','2','3');
my @Ctemp=('1','2','3');
my @mode=('A','B','C');
foreach (@mode) {
my $newmode = join("",$_,mode);
my $newtemp = join("",$_,temp);
}
I want to access the @Amode information through $newmode. Is this possible?
I see what you are trying to do there, but honestly I think you are making it more convoluted than it needs to be.
Why not use hashes?
my $modes = {
'A' => [1,2,3],
'B' => [1,2,3],
'C' => [1,2,3],
};
foreach my $mode (keys %$modes){
... do something with $modes->{$mode};
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With