I have an array of arrays and here are some of the elements I dumped using Dumper:
$VAR6 = [
'B400',
'A1199P1394',
'A'
];
$VAR7 = [
'B400',
'A1205G2425',
'A'
];
$VAR8 = [
'B400',
'A1205Z1534',
'C'
];
$VAR9 = [
'B400',
'A3280F9366',
'B'
What I am trying to do in the code below is check the 3rd element in the array but I can't seem to figure out how to access this particular one. Can someone help me?
$VAR6 = [
'B400',
'A1199P1394',
'A'
];
$VAR7 = [
'B400',
'A1205G2425',
'A'
];
$VAR8 = [
'B400',
'A1205Z1534',
'C'
];
$VAR9 = [
'B400',
'A3280F9366',
'B'
What I am trying to do in the code below is check the 3rd element in the array but I can't seem to figure out how to access this particular one. Can someone help me?
Code:
for my $i ( 0 .. $#item_array )
{
my $abc = [ @{$item_array[$i]} ];
if ( $abc eq 'A' )
{
LogMsg(" [ @{$item_array[$i]} ] This is an A item");
}
else
{
LogMsg(" [ @{$item_array[$i]} ] This is a BCE item");
}
}