我正在尝试将大型 perl 程序转换为 Java。在初始化函数中,它使用括号创建一个散列,然后开始赋值。但是随后键变成了逗号分隔的字符串对和三元组。这是什么意思?
%par=( ... )
$par{"symbolChainAny"}= "*"; # chain name if ...
$par{"acc2Thresh"}= 16; # threshold for...
$par{"txt","copyright"}= "elided";
$par{"txt","contactEmail"}= "elided";
$par{"txt","modepred","sec"}= "prediction of secondary structure";
$par{"txt","modepred","cap"}= "prediction of secondary structure caps";```
最佳答案
$foo{$x, $y, $z}
相当于
$foo{join($;, $x, $y, $z)}
哪里
$;
默认为控制字符( "\x1C"
)。不只是相似...
$ diff \
<( perl -MO=Concise,-exec -e'$foo{$x,$y,$z}' 2>&1 ) \
<( perl -MO=Concise,-exec -e'$foo{join($;,$x,$y,$z)}' 2>&1 ) \
&& echo identical
identical
关于Perl:$hashName {"a","b","c"} = "d"是什么意思;?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58045349/