Others have answered the question about the meaning of $?
.
I thought I would also mention that it is also possible to get help on Perl's special variables at the command prompt:
perldoc -v $?
Depending on your shell, you may need to escape the $
.
perldoc -h