【发布时间】:2010-03-17 22:09:17
【问题描述】:
我得到如下:
use constant ABC => ('one', 'two', 'three');
我想将此常量作为@data 传递给variations_with_repetition(\@data, $k) 子例程。
我该怎么做?
【问题讨论】:
-
有什么理由不使用
use constant ABC => ['one', 'two', 'three'];?[ ABC ]每次使用都会创建一个新的匿名数组。
标签: perl reference constants subroutine