我正在追踪不属于我的程序。以下表达意味着什么:
get_input(
\$args_100{env},
"\n\tAre these reports running out of the TEST environment (Y\/N)?",
0,
'N',
'',
['Y','N']
) if( uc( $ENV{USERNAME} ) =~ /$super_users/i ) ;
我理解if语句,但之前是否?
答案 0 :(得分:6)
如果符号是后缀。见Statement Modifiers in perlsyn
。它相当于
if ( uc( $ENV{USERNAME} ) =~ /$super_users/i ) {
get_input(\$args_100{env},
"\n\tAre these reports running out of the TEST environment (Y\/N) ?",
0, 'N','',['Y','N']);
}
答案 1 :(得分:1)
简短的回答是['Y','N']
创建了一个包含两个单字符字符串"Y"
和"N"
的数组,并返回对该数组的引用。该引用将作为调用get_input
get_input(
\$args_100{env},
"\n\tAre these reports running out of the TEST environment (Y\/N)?",
0,
'N',
'',
['Y','N']
) if( uc( $ENV{USERNAME} ) =~ /$super_users/i ) ;