fadingjava has asked for the wisdom of the Perl Monks concerning the following question:
all i get in server error log is#!/user/bin/perl -w BEGIN { $|=1; print "Content-type: text/html\n\n"; use CGI::Carp('fatalsToBrowser'); } use Fcntl; # find the keyword in gutenberg.txt #@gut_results; @gutenbergr = (1..56522); array_shuffle (\@gutenbergr); $filename = 'gutenberg.txt'; open (GUT, "< /home/sid/kwicionary/$filename") or die "Can't open $fil +ename for reading: $!"; $path = "/home/sid/kwicionary/"; $indexname = "$filename.index"; sysopen(IDX,$indexname, O_CREAT|O_RDWR) or die "Can't open $indexname +for read/write:$!"; build_index(*GUT, *IDX) if -z $indexname; $key = $FORM{'search'}; GUT:foreach (@gutenbergr){ print "$#gut_results \n"; $limit = 100; $line_number = $_; $line = line_with_index(*GUT,*IDX,$line_number); if ($key =~ /\*/){ # $key = substr($key,0,(length($key) -1)); @word = split(' ',$line); foreach (@word){ if ($_ =~ /$key/){ push (@gut_results , $_); if ($#gut_results == 100){last GUT;} } } } else { @word = split(' ',$line); foreach (@word){ if ($_ =~ /^$key$/){ push (@gut_results , $_); if ($#gut_results == 100){last GUT;} #print "matched gutenberg '$_' \n"; } } } undef @word; if ($#gut_results eq $limit){last GUT;} } undef @gutenbergr;
also, cannot understand which file the server could not find. I am including none. can somebody help??Premature end of script headers: search.cgi (2)No such file or directory: exec of '/var/www/cgi-bin/authenticate/s +earch.cgi' failed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: premature end of script headers
by Joost (Canon) on Oct 23, 2004 at 15:00 UTC | |
by fadingjava (Acolyte) on Oct 23, 2004 at 15:22 UTC | |
|
Re: premature end of script headers
by davido (Cardinal) on Oct 23, 2004 at 15:04 UTC | |
by fadingjava (Acolyte) on Oct 23, 2004 at 15:18 UTC | |
by davido (Cardinal) on Oct 23, 2004 at 15:22 UTC |