Following is a snippet of a simple subroutine that parses replicants.
Problem:
The following syntax: iwpt_dcr_value('$index.$sectionName'), returns null for the value of dcr.Bulletin Number.Number
BUT
The following syntax: iwpt_dcr_value('$index.Number'), returns the proper value of dcr.Bulletin Number.Number
Question:
1) Why doesn't iwpt_dcr_value() recognize the value in $sectionName?
2) How can I fix this?
############# START SNIPPET ####################
#
sub parseReplicants {
my $replicantName = shift;
my $sectionName = shift;
my $dcrList = dcr . "." . $replicantName;
foreach my $index (iwpt_dcr_list($dcrList)) {
if (defined $sectionName) {
push
@temp, "\"" . iwpt_dcr_value('$index.Number') . "\"";
}
else {
...
}
}
}
.
.
.
parseReplicants("Bulletin Number", "Number");
#
############# END SNIPPET ####################
Thanks