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.
#!/usr/bin/perl use strict ; $b = 5; my $var=10; print $var;
上面的代码没有抛出错误。我没有用于my变量$b。
my
$b
$b是 Perl 中预先声明的变量。它sort()像这样使用:
sort()
my @sorted = sort { $a <=> $b } @list;
它记录在perldoc perlvar 中。