My first attempt at a doc patch follows.
This corrects an overly narrow description of $@.


C:\WINDOWS\Desktop>diff -u perlvar.pod_orig perlvar.pod
--- perlvar.pod_orig    Mon Jul  8 02:50:32 2002
+++ perlvar.pod Mon Jul  8 03:09:26 2002
@@ -612,10 +612,18 @@
 
 =item $@
 
-The Perl syntax error message from the last eval() operator.  If null, the
-last eval() parsed and executed correctly (although the operations you
-invoked may have failed in the normal fashion).  (Mnemonic: Where was
-the syntax error "at"?)
+The Perl error message from the last C<eval()> or C<eval{}> operator.
+(Mnemonic: Where was the error "at"?)
+
+If this is empty-string, then the last eval was parsed and executed
+correctly -- although the operations you invoked may still have
+failed in the normal fashion, such as an C<unlink($somefile)> simply
+returning 0 on failure.
+
+But if the value of C<$@> is not empty-string, that means that an
+error happened -- either a compilation error (like a syntax error
+or C<use>'ing a nonexistant library), a fatal runtime error (like
+division by zero), or an exception thrown by a C<die> or C<croak>.
 
 Warning messages are not collected in this variable.  You can,
 however, set up a routine to process warnings by setting C<$SIG{__WARN__}>

Reply via email to