Wednesday 2 December 2009

Error Indicators

The variables $@, $!, $^E, and $? contain information about different types of error conditions that may appear during execution of a Perl program.

The variables are shown as ordered by the "distance" between the subsystem which reported the error and the Perl process. They correspond to errors detected by the Perl interpreter, C library, operating system, or an external program, respectively.

$@ - Errors detected by perl interpreter
$! - Errors detected by C library
$^E - Errors detected by Operating System
$? - Errors detected by an external program called from perl.


No comments:

Post a Comment

Tweets by @sriramperumalla