I have looked at this SO post, and saw the part about
my @array = ('a', 'b', 'c');
my $variable = @array; # 3 size of @array
my ($variable) = @array; # 'a' $array[0]
assigning the first element of @array
to my ($variable)
.
I am a little confused about the following code that I have inherited. Specifically, is
my ($ptBatchRec);
being declared as a pointer?
What would happen if I removed the parentheses?
my $DBHandle = shift; # The ICS database handle
my $ptBatchStruct = shift; # -> batch structure (hash)
my ($FiscalYear, $AccountType, $BatchType, $PaymentType, %Args) = @_;
my $DBIsLocked = 0; # Database is locked flag
my ($ptBatchRec); # -> batch record
.
.
.
$ptBatchRec = $DBHandle->selectrow_hashref(
"select * from batch " .
"where yr matches ".$DBHandle->quote($FiscalYear)." " .
"and entry_date = " .
$DBHandle->quote($ptBatchStruct->{"entry_date"})." " .
"and acct_type = ".$DBHandle->quote($AccountType)." " .
"and batch_type = ".$DBHandle->quote($BatchType)." " .
"and pymt_code = ".$DBHandle->quote($PaymentType)." " .
"order by batch_num desc");