views:

127

answers:

2

Perl has quite a few special variables such as @F, $!, %! ... etc. Where are all Perl's special variables documented?

+8  A: 

All special variables used by Perl are documented in perldoc perlvar. You can access the version of this documentation that came with your perl by entering perldoc perlvar on the command line.

KennyTM
@KennyTM Apparently we posted essentially the same answer at the same time. So I deleted mine and put the extra info in it in your post so there aren't two substantially identical answers.
Sinan Ünür
+3  A: 

All special variables used by Perl are documented in perldoc perlvar. You can view this document on your computer by running

perldoc perlvar

The documentation for a specific special variable can also be accessed at the command line using perldoc -v:

perldoc -v @F

You may need to escape/quote some variables to avoid interpolation by your shell:

perldoc -v '$!'

or

perldoc -v "$!"

if you are using cmd.exe.

For more information:

perldoc -h
perldoc perldoc
toolic
Oooh, didn't know about that. Sweet!
Robert P
the powers that be decided to lose that feature in the 'perldoc rewrite' in perl 5.9, now it is, 'be verbose'
MkV