Further in the Perl script:
$a=apple $b=orange if ($?==0) { # do something }
What does $? mean $? ?
$?
This is the state returned by the last operation of the system, pipe or reverse. See perlvar link.
$? , along with all other "magic" variables, is documented in the perlvar section of Perl files. Unless you actually have a Unix-like installation using the man command, you should also be able to google for man perlvar .
perlvar
man
man perlvar
Others answered the question about the meaning of $? .
I also thought that you could also get help on special Perl variables on the command line:
perldoc -v $?
Depending on your shell, you may need to avoid $ .
$
perldoc -h
$? or $ CHILD_ERROR (if English is used) contains the status of the last blitz (or several ways to start a child process with Perl.) See perlvar for a full explanation.