an infinite loop

2003-02-05 Thread Shahar Evron
this peace of code seems to generate an infinite loop, and i have no clue why. this may very well be for a very silly reason, but i'm clueless... while (1) { if ($ntries >= 4) { print ERRLOG "Error : failed $ntries login attempts - giving up.\n"; return 2; } sleep (30*$ntries*$ntrie

HTTP error 500

2003-02-05 Thread Shahar Evron
hi everyone... I guess this problem is less related to perl (though it might be) and more related to HTTP... I'm trying to write a program that sends an HTTP request (using LWP::UserAgent::Request) to a server (web.icq.com, which i know is working fine), but all i get in status_line is "500 Can'

RE: HTTP error 500

2003-02-05 Thread Joel Hughes
Shahar, Can you hit web.icq.com from your web browser (I can) - if so then its not a web server problem. Would sound more like that web.icq.com don't like your useragent/headers/cookies or something (a sort of anti bot/spider tactic) and are giving you a 500 error. Can you show us your code? Are

Re: Printing arrays without empty variables

2003-02-05 Thread Janek Schleicher
On Tue, 04 Feb 2003 17:37:35 -0500, Jan Cohen wrote: > I'm just learning perl and would like to know how to print the contents of > an array, without printing any of the elements in the array that might be > empty. > [...] perldoc -f grep Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PRO

Re: an infinite loop

2003-02-05 Thread Janek Schleicher
On Tue, 04 Feb 2003 22:33:13 +0200, Shahar Evron wrote: > this peace of code seems to generate an infinite loop, and i have no > clue why. this may very well be for a very silly reason, but i'm clueless... > >> while (1) { >> if ($ntries >= 4) { >> print ER

Re: HTTP error 500

2003-02-05 Thread Shahar Evron
well, i've been trying to grap a page from my own site, and it gives me the same error. also, i use $ua->agent("Mozilla/4.73 [en] (Win95; I)") to cover up for the useragent problem... could this be related to $ua->proxy ? (as i said, this is not my server... i don't know if i'm supposed to use a

RE: HTTP error 500

2003-02-05 Thread Joel Hughes
>>well, i've been trying to grap a page from my own site, and it gives me >>the same error. Hi Shahar, This sends like a code problem then. Can you post a relevant snippet of your code? joel --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). V

Re: HTTP error 500

2003-02-05 Thread Shahar Evron
here's the relevant part from a test code i've been running to sort out this problem. it does pretty much the same as the original one, except for the facts that this one is simplified, and it uses GET instead of POST, but gives the same error.. -- my ($ua, $req, $res); $

RE: Cookie INfo

2003-02-05 Thread Kipp, James
> > > Can anyone point me to some good docs for using cookies > with Perl/CGI. I can > > only seem to find docs using Javascript. I have already > read the cgi.pm > > docs, but looking for something with more info. > > > > Do you have a specific question? it seems: > > http://search.cpan.org/

Re: HTTP error 500

2003-02-05 Thread Shahar Evron
Thanks all, but i got it. I installed the script on a different server, and it works just fine. Is it possible that NetFirms who hosted me is blocking HTTP requests in some way? or mybe there's another problem? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: Cookie INfo

2003-02-05 Thread John Mooney
You also might want some background on the HTTP header field for Set-Cookie - sort of behind the scenes of what the CGI module does. I'd suggest some research for "RFC 2109" and "http set-cookie". I found this helpful to understand the simple cookie header-field syntax, separate from the CGI met

Variable passing

2003-02-05 Thread Stephen Spalding
Hello all, I've written a cgi page whose form I've set up to open another window. I'm having problems getting an input variable to pass from the originating page to the page that's being opened. I've included some snippits from my code below. I can't even get it to work in this simple example. Ca

looking for a host

2003-02-05 Thread Shahar Evron
hi all.. i'm doing all sorts of tests with CGI related perl, and i need a good host that supports perl and SSI to run my scripts on. I'm working with one of those free web site hosting companies that put ads on my pages, and i have problems with stuff like viewing logs, installing moudules and s

Re: Variable passing

2003-02-05 Thread drieux
On Wednesday, Feb 5, 2003, at 14:00 US/Pacific, Stephen Spalding wrote: Hello all, I've written a cgi page whose form I've set up to open another window. I'm having problems getting an input variable to pass from the originating page to the page that's being opened. I've included some snippits

RE: Variable passing

2003-02-05 Thread Peter Kappus
Hi Stephen, In this particular example, you're merely using the onClick event of the form button to open a window and point it to sample2.pl For this particular case, I would actually create a series of links on the first page (instead of a form) and make those links open a popup and send data t

Re: looking for a host

2003-02-05 Thread Wiggins d'Anconia
Shahar Evron wrote: hi all.. i'm doing all sorts of tests with CGI related perl, and i need a good host that supports perl and SSI to run my scripts on. I'm working with one of those free web site hosting companies that put ads on my pages, and i have problems with stuff like viewing logs, inst

Using variable to another script

2003-02-05 Thread Glynn S. Condez
Hi all, I have a question. From a web form, i pass the info to a cgi script. i have this variable on the script: $username = param('username'); $lastname = param('lastname'); my question is, how can i use that two variable to another script open by this command: system('sudo', '-u', 'www', '/