
Aquilo
journeyman
Feb 3, 2001, 1:42 AM
Post #1 of 4
(424 views)
|
Perl Archive search error, need help :)
|
Can't Post
|
|
I tryed searching for this in the learning center but got errors :) This is for jave script how can I make this perl??
just FYI, you can also implement the modulus function. i think it may be something like \ or // in some languages, but in JS its % basically for a % b it would divide a by b then return the remainder. " The black lines or are % 10 with out a space " if ((myweekday)==1) { myext = "st"; } else if((myweekday) == 2) { myext = "nd"; } else if((myweekday) == 3) { myext = "rd"; } else { myext = "th"; } if (($mday) eq "1") { $hy = "st"; } elsif (($mday) eq "2") { $hy = "nd"; } elsif (($mday) eq "3") { $hy = "rd"; } else { $hy = "th"; } Also why don't your search script just cut out / and \ if it's going to go into an error
Content-type: text/html CGI ERROR ========================================== Error Message : fatal error: [Sat Feb 3 03:24:08 2001] search2.cgi: /\/: trailing \ in regexp at /home/perlarchive/www/cgi-bin/new/headfoot.cgi line 226. Script Location : search2.cgi Perl Version : 5.006 Form Variables ------------------------------------------- Format : Standard Range : All bool : or mh : 25 query : \ or // searchcat : guide type : keyword Environment Variables ------------------------------------------- DOCUMENT_ROOT : /www/perlarchive GATEWAY_INTERFACE : CGI/1.1 HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_ACCEPT_LANGUAGE: en-us,ie-ee;q=0.5 HTTP_CONNECTION : Keep-Alive HTTP_HOST : www.perlarchive.com HTTP_REFERER : http://www.perlarchive.com/search/search2.cgi? Range=Any&Format=Standard&query=modulus&mh= 25&type=keyword&bool=or&searchcat=guide HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) PATH : /usr/local/bin:/usr/bin:/bin QUERY_STRING : Range=All&Format=Standard&query=\+or+//+&mh=25 &type=keyword&bool=or&searchcat=guide REMOTE_ADDR : 208.8.113.30 REMOTE_PORT : 4945 REQUEST_METHOD : GET REQUEST_URI : /search/search2.cgi? Range=All&Format=Standard&query=\+or+//+&mh=25 &type=keyword&bool=or&searchcat=guide SCRIPT_FILENAME : /www/perlarchive/search/search2.cgi SCRIPT_NAME : /search/search2.cgi SERVER_ADDR : 216.71.44.169 SERVER_ADMIN : webmaster@perlarchive.com SERVER_NAME : www.perlarchive.com SERVER_PORT : 80 SERVER_PROTOCOL : HTTP/1.1 SERVER_SOFTWARE : Apache/1.3.12 (Unix) FrontPage/4.0.4.3
|