close

http://www.perlmonks.org/?node_id=517176

$array = \(); doesn't create a reference to an empty array. You probably want $array = [];

\() creates individual references to each entity inside of the ().

Since there is no entity inside of your (), no reference is created.

[] is the anonymous array constructor. That's what you're looking for.

$array = [];

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 wenching520 的頭像
    wenching520

    牧羊人

    wenching520 發表在 痞客邦 留言(0) 人氣()