开发者

How can I pass a constant to a Perl subroutine?

开发者 https://www.devze.com 2022-12-23 13:02 出处:网络
I have got as follows: use constant ABC =&g开发者_开发知识库t; (\'one\', \'two\', \'three\');

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

精彩评论

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