uninitialized value?

2002-06-26 Thread kb
Ok, here's more of my on-going saga. All of a sudden the page stop loading so I check the error logs and ran a perl -Tcw in the shell. The syntax is fine but these errors showed up on the log: [Wed Jun 26 06:33:34 2002] [error] [client 209.245.115.253] Premature end of script headers: /hsphe

RE: uninitialized value?

2002-06-26 Thread Hanson, Robert
> Premature end of script headers: This could be a lot of things. > Use of uninitialized value in string eq at index.cgi line 14. This is merely a warning, not an error. This won't cause a script to fail (see perldoc perdiag). The real error (the first one) isn't giving you any clue. Basical

Re: uninitialized value?

2002-06-26 Thread David vd Geer Inhuur tbv IPlib
Hi, First check if your "$c" has arrived : > my $c = param('c'); > my $content = "c"; print "Hello $c "; If this works, you'dd better send some more code. Else you know why he complains. Actualy I prefer this : if (($c eq "h") || ($c eq "eh") || ($c eq "hd") || ($c eq "p") || ($c eq "c")) {

RE: uninitialized value?

2002-06-26 Thread Hanson, Robert
Assuming the Content-type isn't printed at the point the script ends(die, exit, etc), this won't print either. So you could instead print it to STDERR so that it shows up in the logs... print STDERR "Hello $c \n"; Rob -Original Message- From: David vd Geer Inhuur tbv IPlib [mailto:[EMA

Re: uninitialized value?

2002-06-26 Thread Felix Geerinckx
on Wed, 26 Jun 2002 11:58:12 GMT, [EMAIL PROTECTED] (David Vd Geer Inhuur Tbv Iplib) wrote: > Actualy I prefer this : > > if (($c eq "h") || ($c eq "eh") || ($c eq "hd") || ($c eq "p") || > ($c eq "c")) { $content = qq{\n}; } Why not use my %in = map { $_ => 1} qw(h eh hd p c); $cont

Search-algoritm

2002-06-26 Thread the sequel
Hello, I'd like to ask if anyone has a good general search algoritm to use for plain text. The idea is, of cause, to get wildcards and typical boolean operators in the algoritm. Maybe returning a array with matches in descending order. I'm open to suggestions. Anyone has a close call? ;) /dune

Re: uninitialized value?

2002-06-26 Thread Kyle Babich
Actually I do have the content-type printed: #!/usr/bin/perl -wT use strict; use CGI qw/ :standard /; $CGI::DISABLE_UPLOADS = 1; $CGI::POST_MAX = 512 * 1024; print "Content-type: text/html\n\n"; I attached the entire script to this message. - Original Message - From: "Hanson, Robert" <

logon on startup

2002-06-26 Thread Martin Pestun
Hi I've got cgi scripts running on the local Apache. When somebody wants to login my web site, I would like to want from him to use this logon message like this: (Embedded image moved to file: pic28145.pcx) Can you tell me, how can I solve this problem? Thanks Martin pic28145.pcx Description

RE: uninitialized value?

2002-06-26 Thread Hanson, Robert
Hmmm... I didn't see any problems in the script and it works for me, both at the command line and running through Apache. Have you tried just running it at the command line to see if it works there (without the -T)? If it does work at the command line it could be your web server, unless you have

RE: uninitialized value?

2002-06-26 Thread kb
Well, I haven't had any other scripts give me errors yet. I'm getting the same problem on two different servers too: http://imap.cc/cgi-bin/index.cgi http://kb2.net/cgi-bin/index.cgi (Btw: I just added that else error: content failed) Quoting "Hanson, Robert" <[EMAIL PROTECTED]>: > Hmmm...

RE: logon on startup

2002-06-26 Thread Troy May
http://apache-server.com/tutorials/ATusing-htaccess.html -Original Message- From: Martin Pestun [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 5:46 AM To: [EMAIL PROTECTED] Subject: logon on startup Hi I've got cgi scripts running on the local Apache. When somebody wants to

Re: logon on startup

2002-06-26 Thread Bruce Ferrell
It done using the apache .htaccess file Martin Pestun wrote: > Hi > I've got cgi scripts running on the local Apache. > > When somebody wants to login my web site, I would like to want from him to > use this logon message like this: > (Embedded image moved to file: pic28145.pcx) > > Can you te

Re: Web Store

2002-06-26 Thread zentara
On Sun, 23 Jun 2002 14:44:48 -0400, [EMAIL PROTECTED] (Lewis Kirk) wrote: >I have set up a site using the venerable Web Store from Extropia >(http://www.extropia.com/applications/web_store.html) . I am curious, >as the basic program is pretty old, if there are any drawbacks or >issues with it?

Re: Search-algoritm

2002-06-26 Thread zentara
On Wed, 26 Jun 2002 14:17:24 +0200, [EMAIL PROTECTED] (The Sequel) wrote: >Hello, > >I'd like to ask if anyone has a good general search algoritm to use for >plain text. The idea is, of cause, to get wildcards and typical boolean >operators in the algoritm. Maybe returning a array with matches in

Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
Hi all, Please forgive the simple nature of this question. I have never really used regular expression extensivly. Here goes. I am trying to extract a number from in between two parenthesis. I want the first value I find (from right to left) in a string. These numbers could be phone number

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread perl-dvd
-- my $var = "(801) 555-"; # ya, ok so I'm in utah :) $var =~ /(\(\d+\))/; # real paren, escape paren, \d = digits, # + = one or more, escape paren, real paren my $area_code = $1; # set to what came from between the real parens

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
David, Thank you very much for your help. Don't know Utah, I have a lot of friends from there. The expression you provided is almost what I am after. Here is my string. my $String = "Characters(803), Value(3)"; What I am trying to get is "803", but I keep getting "(803)". Is there a way to

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread David T-G
Kristofer -- ...and then Kristofer Hoch said... % % David, % Thank you very much for your help. Don't know Utah, I have a lot of % friends from there. The expression you provided is almost what I am after.. % Here is my string. % % my $String = "Characters(803), Value(3)"; % % What I am try

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
David(s), Thank you for your help. It works perfectly now. I am adding in both of y'alls names into my class file for your help. (803 is South Carolina, which should explain the accent on the yall) Thank you botha again. Kristofer. Original Message Follows From: David T-G <[EMAIL P

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread David T-G
Kristofer -- ...and then Kristofer Hoch said... % % David(s), % Thank you for your help. It works perfectly now. I am adding in both of % y'alls names into my class file for your help. Happy to help! % % % (803 is South Carolina, which should explain the accent on the yall) I know. Less

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Brian
Kristofer, you might want to check out the man page's perlrequick and perlre- I found them pretty useful when I was first learning regex (the man page perlretut isn't bad either). Either way, try this; my $string = '(608)-555-1234'; $string =~ /\((\d+)\)-(\d+)-(\d+)/; this results in $1=608, $2

Re: uninitialized value?

2002-06-26 Thread drieux
On Wednesday, June 26, 2002, at 05:13 , Felix Geerinckx wrote: > Why not use > > my %in = map { $_ => 1} qw(h eh hd p c); > $content = "\n" if $in{$c}; We keep tossing around these 'map' tricks - and I was wondering why we do not put them up in the BEGIN { %in =

Re: uninitialized value?

2002-06-26 Thread drieux
On Wednesday, June 26, 2002, at 06:11 , [EMAIL PROTECTED] wrote: [..] >>> Use of uninitialized value in string eq at index.cgi line 14. [..] >>> Here is what (I believe) it is talking about: >>> my $c = param('c'); >>> my $content = "c"; >>> >>> if ($c eq "h") { let us assume that the above is '

Templates v/s CGI.pm [WAS:] Displaying Problems

2002-06-26 Thread Todd Wade
"Kyle Babich" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ... bunch of code snipped here . > -bgcolor => "\#00", > -align => "center"}, >Font({ > -face => "Verdana, Arial, Times New Roman", > -size => "4", > -color => "\#FF"}, > "IMAP.cc" >

Re: Displaying Problems

2002-06-26 Thread fliptop
On Tue, 25 Jun 2002, [EMAIL PROTECTED] opined: :> CGI.pm--a threat to our way of life! Down with the troglodytes! :) :Well, not exactly my point, but ok :) Just kidding :I just think there are too many who close their minds to anything but CGI.pm, :including potentially :more efficient custo

Re: uninitialized value?

2002-06-26 Thread fliptop
On Wed, 26 Jun 2002, drieux opined: d:wouldn't it follow that the problem is that $c is d:not a defined value... d: d:eg: d: d:1 #!/usr/bin/perl -w d:2 use strict; d:3 d:4 # #FILENAME# - is for d:5 d:6 use CGI qw/ :standard /; d:7 $CGI::DISABLE_UPLOADS = 1; d:8 $CGI::POST_MAX = 512 * 1024; d:9 d:

Re: Displaying Problems

2002-06-26 Thread eric-perl
On Tue, 25 Jun 2002, Kyle Babich wrote: > Ok, I did like perldoc cgi said and changed it to this: > > print start_html( > -title => "IMAP.cc", >-head => Link( >{ >-rel => "stylesheet", >-type => "text/css", >-href => "style.css", >

CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-26 Thread Todd Wade
<[EMAIL PROTECTED]> wrote in message 008d01c21c73$aa978a30$d381f6cc@david">news:008d01c21c73$aa978a30$d381f6cc@david... . snip > I'm sure I'll get lots of hate mail from CGI.pm die hard's, but my other choice is to just not Not trying to post hate mail, just reasoning on the subject. >

What is wrong? (LWP::Simple)

2002-06-26 Thread Octavian Rasnita
Hi all, The following script works under Apache 1.33 and Apache 2.0.36, but it doesn't work under Apache 2.0.39. Can you tell me why? It is a simple script which tests if the main page from localhost exists or not. The script tells me that the Page can't be found. ... after a long time of "Openi

text/plain versus text/html

2002-06-26 Thread Octavian Rasnita
Hi all, Can you tell me what should I put in an SHTML file to show like text/html and not as text/plain? if I use: use LWP::Simple; print head(http://localhost/index.shtml); This prints: text/plain; charset=ISO-8859-1Apache/2.0.36 (Win32) I have problems because of this fact with a web crawl

RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-26 Thread Scot Robnett
> Its pretty hard to make it more simple than: > use Form; > my %input = Form(); Let me try. use CGI; %params = $q->Vars; Scot R. inSite

Re: text/plain versus text/html

2002-06-26 Thread Connie Chan
Well... what's the rest of your .shtml file ? did you put a ? - Original Message - From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 26, 2002 10:11 PM Subject: text/plain versus text/html > Hi all, > > Can you tell me what should I put in an SHT

Re: What is wrong? (LWP::Simple)

2002-06-26 Thread Connie Chan
How about LWP::UserAgent ? Besides, did you make the in your index.html ? ( I don't know if this is nessary or not, but I always get the right result with and the file.html as a full path) And Umm Is the "Page cannot be found" Comes up by your server ( Standard 404 ), or Explorer Error, or

Re: uninitialized value?

2002-06-26 Thread Felix Geerinckx
on Wed, 26 Jun 2002 22:56:23 GMT, [EMAIL PROTECTED] (Drieux) wrote: > We keep tossing around these 'map' tricks - > and I was wondering why we do not put them up in > the > > BEGIN { > %in = map { $_ => 1} qw(h eh hd p c); > > } > > So that we compile them onc

RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-26 Thread Felix Geerinckx
on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett) wrote: >> Its pretty hard to make it more simple than: >> use Form; >> my %input = Form(); > > Let me try. > > > use CGI; > %params = $q->Vars; > Try again. Your c