What does a dollar sign followed by a question mark mean in Perl?

前端 未结 4 1897
萌比男神i
萌比男神i 2021-01-11 23:06

In the following in Perl script:

$a=apple
$b=orange

if ($?==0) {
  # do something
}

What does $? mean here?

4条回答
  •  无人及你
    2021-01-11 23:48

    $?, along with all the other "magic" variables, is documented in the perlvar section of the Perl manpages. If you don't actually have a Unix-like setup with the man command, you should also be able to Google for man perlvar.

提交回复
热议问题