【发布时间】:2012-01-25 19:50:16
【问题描述】:
在perldata中,我找到了下面的例子和解释。
@foo = ('cc', '-E', $bar);
assigns the entire list value to array @foo, but
$foo = ('cc', '-E', $bar);
assigns the value of variable $bar to the scalar variable $foo.
这真的让我很困惑,所以$foo 等同于$bar?如何理解@foo和$foo的区别
【问题讨论】: