next if ! -r $file;
- open( FILE, $file );
+ open( FILE, $file ) or die $!;
$addr = <FILE>;
+ defined $addr or die $!
chop $addr;
close( FILE );
}
close( NEWSGROUPS );
- open( LOG, ">>$webstump_home/log/webstump.log" );
- print LOG "Call from $ENV{'REMOTE_ADDR'}, QUERY_STRING=$ENV{'QUERY_STRING'}\n";
+ open( LOG, ">>$webstump_home/log/webstump.log" ) or die $!;
+ LOG->autoflush(1);
+ print LOG "Call from $ENV{'REMOTE_ADDR'}, QUERY_STRING=$ENV{'QUERY_STRING'}\n" or die $!;
}
# gets the directory name for the newsgroup
my $sendmail_command = "$sendmail $recipient";
$sendmail_command =~ /(^.*$)/;
$sendmail_command = $1; # untaint
- open_pipe_for_writing( SENDMAIL, "$sendmail_command > /dev/null " );
- print SENDMAIL $message;
- close( SENDMAIL );
+ open_pipe_for_writing( SENDMAIL, "$sendmail_command > /dev/null " )
+ or die $!;
+ print SENDMAIL $message or die $!;
+ close( SENDMAIL ) or die "$? $!";
}