jes*_*per 2 perl reference constants subroutine
我有如下:
use constant ABC => ('one', 'two', 'three');
Run Code Online (Sandbox Code Playgroud)
我想把这个常量传递给variations_with_repetition(\@data, $k)
子程序as @data
.
我该怎么办?
使用[]
运算符将列表转换为ARRAY引用:
variations_with_repetition( [ABC] , $k );
Run Code Online (Sandbox Code Playgroud)