Hi all
 
What am I doing wrong.
 
error.log;
[Tue Oct 01 11:09:10 2002] [error] [client 165.25.207.246] [Tue Oct  1
11:09:09 2002] c:\PROGRA~1\APACHE~1\apache\cgi-bin\start_n2.pl: Name
"mail::Sendmail::error" used only once: possible typo at
c:\PROGRA~1\APACHE~1\apache\cgi-bin\start_n2.pl line 26.
 
The code is:
#!c:/perl/bin/perl -w
use strict;
$| = 1;
use CGI qw( :standard );
use CGI::Carp qw( fatalsToBrowser );
my $teadd = param("emailaddr");
my $seadd = '[EMAIL PROTECTED]';
print header, 
start_html( -title => "FeedForward network using backpropagation",
-bgcolor => "#ffffcc" ),
br, hr;
if ($teadd) {
 open(NNO, "nnet_out.txt") or die"Cannot open nnet_out:$!";
 open(TRO, "train_out.txt") or die"Cannot open train_out:$!";
 my $message = "Begin nnet_out file\n\n";
 local $/ = undef;            # locally disable end of line, force 
 $message .= <NNO>;           # this idiom to slurp the file
 $message .= "\nEnd nnet_out, begin train_out files\n\n";
 $message .= <TRO>;
 $message .= "\nEnd train_out, end message\n";
 use Mail::Sendmail;
 my %mail = ( To        => $teadd,
        From      => $seadd,
     Subject   => 'Neural Nets',
     Message   => $message
      );
 sendmail(%mail) or die $mail::Sendmail::error;
 print "OK. Log says:\n", $Mail::Sendmail::log;
 close NNO;
 close TRO;
 exit;
}
#my @results = `pittnet9_both 1 c 1 1 1 1 1 1 1 training_in.txt a 100
..87 .001`; 
#my @results = `pittnet9_both 1 U nnet_in.txt 1 training_in.txt S 2 50
0.5 0.002`;
my @results = `bruceabackprop.exe 1`;
# backtics execute the .exe and captures the result
if(scalar @results) {
 foreach(@results) {
  if ($_ !~ /\S/) {
   next;
  }
  print "$_<br>";
 } 
} else {
 print"Backtick stumbled<br>$!";
}
print hr, br,
start_form,
input( { -type => 'text', -name => 'emailaddr' }),
br, input( { -type => 'submit'} ),
end_form,
end_html;
 
—-------------------------------
 
thanks
bruce


Reply via email to