Perl Programming Page 10 - Understanding Perl's Special Variables |
Now, while the cryptic variable names discussed over the preceding pages In order to use the more-readable human-language names, simply add the line
to the top of your Perl script. You should now be able to use Perl's longer names for the special variables $_ = $ARG $/ = $INPUT_RECORD_SEPARATOR $\ = $OUTPUT_RECORD_SEPARATOR $, = $OUTPUT_FIELD_SEPARATOR $? = $CHILD_ERROR $@ = $EVAL_ERROR $! = $OS_ERROR $< = $REAL_USER_ID $> = $EFFECTIVE_USER_ID $( = $REAL_GROUP_ID $) = $EFFECTIVE_GROUP_ID $. = $INPUT_LINE_NUMBER $0 = $PROGRAM_NAME $$ = $PROCESS_ID $] = $PERL_VERSION Consider the following variant of a previous example, which demonstrates
blog comments powered by Disqus |
|
|
|
|
|
|
|