开发者

How can I pass a constant to a Perl subroutine?

I have got as follows:

 use constant ABC =&g开发者_开发知识库t; ('one', 'two', 'three');

and I want to pass this constant to variations_with_repetition(\@data, $k) subroutine as @data.

How should I do that?


Use the [] operator to convert a list to an ARRAY reference:

variations_with_repetition( [ABC] , $k );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜