這是篇很蠢自己memo用的hint perl -F/#/ -ane '$sum+=$F[1]; print "$sum\n" if eof' < t 以前想不到要怎麼在做完while loop後再輸出sum, 總是笨笨地輸出一排數字再看最後一個