相关疑难解决方法(0)

Perl编译困境

我正在编译这个方法:

#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);
        } 
    }   
}
Run Code Online (Sandbox Code Playgroud)

这是错误消息:

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 "}"
Run Code Online (Sandbox Code Playgroud)

任何人都可以看到问题出在哪里?

perl sigils perl-context

0
推荐指数
1
解决办法
157
查看次数

标签 统计

perl ×1

perl-context ×1

sigils ×1