Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么会这样打印8?为什么不$e改$i?
8
$e
$i
my $i = 8; sub u { return \$i; } my $e = u(); $e = "eer"; print $i; #8
引用不是别名。您必须明确取消引用它们。
$$e = "eer"; # Store 'eer' into the variable referenced by $e
不一样
$e = 'eer'; # Store 'eer' into $e, discarding its previous content