http://www.perlmonks.org?node_id=256173

Mask has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
my daemon died with this messages in log file:
Server socket ready, accepting... at qd.pl line 530 Can't use an undefined value as a symbol reference at qd.pl line 533
But in line 533 i have next code:
529>if( $ready_socket==$server ) { # Incomming connection 530> warn "Server socket ready, accepting..."; 531> my $new_connection=$server->accept(); 532> # make the socket non-blocking 533> my $flags = fcntl($new_connection, F_GETFL, 0) 534> or die "cannot get flags for socket: $!\n"; .....
How can it be that error message in log file(Can't use an undefined value as a symbol reference) is different from "die" message in the code(cannot get flags for socket: $!)?