Understanding Perl's Special Variables - End Zone (Page 11 of 11 )
And that's about it for this tutorial. Over the preceding few pages, I
introduced you to the following special variables in Perl:
$_ (the default variable)
$/ (the input record separator)
$\ (the output record separator)
$, (the output field separator)
@ARGV (the command-line argument array)
@_ (the subroutine argument array)
@INC (the include path array)
%ENV (the environment variable array)
$? and $! (the last error code)
$@ (the last error in an eval() block)
$<, $>, $) and $( (the real and effective UID/GIDs)
$. (the line number of an input file)
$ARGV (the name of an input file)
$0 (the name of the current script)
$$ (the process ID of the current script)
$[ (the Perl version number)
Of course, these are just some of the more commonly-used creatures you'll
encounter in your travels through the Perl universe. Perl has a whole bunch
more of these special variables which have not been discussed here - you
can find them all in the "perlvar" manual page. Take a look for yourself,
and until we meet again...stay healthy!
Note: Examples are illustrative only, and are not meant for a production
environment. Melonfire provides no warranties or support for the source
code described in this article. YMMV!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |