I have the following Perl code:
package CustomerCredit;
#!/usr/local/bin/perl
use 5.010;
use strict;
my $TransRef = @_; # This code comes from a sub within the package.
my ($Loop, $TransArrRef, $TransID);
for ($Loop = 0; $Loop < $$#TransRef; $Loop++)
{
$TransArrRef = $$TransRef[$Loop]; # Gets a ref to an array.
$TransID = $$TransArrRef[0]; # Try to get the first value in the array.
# The above line generates a compile time syntax error.
...
}
$TransRef is a reference to an array of references to arrays. I am trying to process each element in the array pointed to by $TransRef. $TransArrRef should obtain a reference to an array. I want to assign the first value within that array to $TransID. But, this statement generates a compile syntax error.
I must be doing something wrong, but can not figure out what it is. Can anyone help?