Where can I find information about Perl's special variables?

前端 未结 2 1570
無奈伤痛
無奈伤痛 2021-01-18 13:31

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

2条回答
  •  清酒与你
    2021-01-18 14:09

    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
    

提交回复
热议问题