作者gecer (gecer)
看板Perl
标题[问题]一段语法询问
时间Sun Apr 1 08:29:01 2018
https://perlmaven.com/traversing-the-filesystem-using-a-queue
use 5.010;
my $path = shift || '.';
想请问
1.为什麽要use 5.010; 若没有会有什麽影响
2.shift || '.'的意思
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.255.12.55
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Perl/M.1522542545.A.6D4.html
1F:推 cutekid: shift || '.' 等价於 shift @ARGV || '.' 唷 ^_^ 04/01 13:25
4F:→ flu: 部份 04/01 21:10