print "$array[$i]\n"; } 看到$#array這個奇怪的東東沒? 這是Perl的一個特殊用法,代表這個陣列最後一個元素的註標。 ... print FILE "print $x to a file.";
確定! 回上一頁