perl -nla -F/ / -e"...", 其中-n: while(<>){...}-l: chomp-a: autosplit-F: 与a结合的分隔模式-e: 执行eC:Usersjason>perl -nla -F/ / -e "BEGIN{our $cnt=0;print 'start...';} print $F[$#F];$cnt++; END{print 'total:',$cnt;}" e:/test.txtstart...d1d2d3total:3