Perhaps the formulation of my question (using the words unexpected and strange) was leading to the assumption that I did not read the docs of system before posting here a question.It certainly did. Specially since the documentation says that the lower 8 bits don't have to be 0 - they are non-zero if the program exits because of receiving a signal, and/or dumped core. Given this, dividing the exit code by 256 is wrong, as Perl doesn't do integer arithmetic by default. The documentation says one should shift 8 bits - which you don't do. So, not only does the phrasing of your question suggests you haven't read the documentation, your code does the same.
In reply to Re^3: Process exit status
by JavaFan
in thread Process exit status
by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |