Multiple choice technology programming languages

What do the variable $! contains?

  1. Page length of a particular output file

  2. The input end-of-line character

  3. The return code returned by a command called by the system function.

  4. The error code generated by a system library routine.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In Perl, the special variable $! contains the error number or error string from the last system call or library function that failed. When used in a numeric context, it returns the error code; in string context, it returns the corresponding error message.