Search notes:

Perl variables: $^E (os error info)

#
#   TODO: Like $!, $^E is a dualvar, a scalar that contains two values. One's a string, and one's a number.
#        (http://stackoverflow.com/a/24757708/180275)
#
use warnings;
use strict;

my $file_name    = "an inexisting file!";
my $file_handle;

unless (open ($file_handle, "<", $file_name)) {

   print "\n";
   print "  could not open $file_name\n";
   print "  The operating system sasy: $^E\n";
   print "  Compare with \$!:           $!\n";
   print "\n";

}
Github repository about-perl, path: /variables/^E__os_error_info.pl

See also

Perl variables

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758201476, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/variables/caretE__os_error_info(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78