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.
Perl Programming 包含这样一段代码:
for $family ( sort { @{$HoA{$b}} <=> @{$HoA{$a}} } keys %HoA ) { say "$family: ", join(", " => sort @{ $HoA{$family} }); }
我想知道的是连接函数中的“=>”是什么意思?
=>通常被称为“胖逗号”。它在大多数方面都像逗号一样,但会强制将任何裸词留给它被解释为字符串。
=>
对于这个特定的代码片段,is 似乎只是一种不常见的风格选择。