發新話題

Perl的基本語法 - Spectial Variables

Perl的基本語法 - Spectial Variables

Spectial Variables Perl的特色之一就是有超過50個以上的特殊變數,這些變數都是全域變數,用來設定程式的執行環境和其它細節。若你想深入瞭解Perl程式設計,那麼這些東西是不可或缺的。在這裡我只列幾個常用的特殊變數以供參考,有興趣的人請自行查閱。

$_ The default input and pattern-searching space.
$digit Contains the subpattern from a successful parentheses pattern match.
$. The current input line number of last filehandle read.
$! Contains the current value of errno.
$0 The name of the file of the Perl script.
@ARGV The command line arguments issued when the script was started.
@_ The parameter array for subroutines.
%ENV This associative array contains your current environment.

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。