我在编译这个方法时遇到了一些麻烦:
#changes the names of the associations for $agentConf
#where the key value pairs in %associationsToChangeDict are the old and new values respectively
sub UpdateConfObjectAssociations{
my($agentConf, %associationsToChangeDict) = @_;
foreach my $association ($agentConf->GetAssociations()) {
if ( grep {$_ eq $association->Name()} keys %associationsToChangeDict) {
my $newValue = %associationsToChangeDict{$association->Name()};
$association->Value($newValue);
}
}
}
这是错误消息:
syntax error at D:\Install\AutoDeployScripts\scripts\Perl/.\AI\SiteMinderHelper
.pm line 75, near "%associationsToChangeDict{"
syntax error at D:\Install\AutoDeployScripts\scripts\Perl/.\AI\SiteMinderHelper
.pm line 79, near "}"
谁能看出问题出在哪里?