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

前端 未结 4 1862
萌比男神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:29

    $? or $CHILD_ERROR (if use English) contains the status of the last backtic (or several means of running a child process from Perl.) See perlvar for a full explanation.

提交回复
热议问题