Perl: how these two variables are equal numerically?

2007-04-09 Thread Hoffmann
Could some one explain how, in the example below, $name and $goodguy are equal numerically? $name= 'Mar'; $goodguy = 'Tony'; if ($name == $goodguy) { print "Hello, Sir.\n"; } else { print "Begone, evil peon!\n"; } Thanks, Hoffmann

Re: OT: html checkbox question

2007-04-09 Thread jm
On 4/9/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 4/9/07, jm <[EMAIL PROTECTED]> wrote: > the first group only returns the first selection, > regardless of how many are chosen. Use the param() function in list context, not scalar; see the CGI module's documentation. The example in the synop

Re: Beginning to use the stricts and warnings

2007-04-09 Thread Chas Owens
On 4/9/07, Jean-Rene David <[EMAIL PROTECTED]> wrote: * Chas Owens [2007.04.09 11:00]: > > for (my $i = 0; $i < @banks; $i++) > > If you must loop this way at least do it like this: > > for my $i (0 .. $#banks) {} > > But most likely you don't need to loop that way and it is better to > loo

Re: Problem Accessing Perl ModulesThrough .htaccess

2007-04-09 Thread Tom Phoenix
On 4/9/07, Wijaya Edward <[EMAIL PROTECTED]> wrote: works on plain cmdline (with/without "use lib"). But not in through Apache. Sometimes it's difficult to debug what's in your CGI environment. That's what Inside is for: http://search.cpan.org/~phoenix/Inside-1.01/ Hope this helps! --Tom

Re: OT: html checkbox question

2007-04-09 Thread Tom Phoenix
On 4/9/07, jm <[EMAIL PROTECTED]> wrote: the first group only returns the first selection, regardless of how many are chosen. Use the param() function in list context, not scalar; see the CGI module's documentation. The example in the synopsis of the CGI manpage shows how to handle multiple ch

RE: Problem Accessing Perl ModulesThrough .htaccess

2007-04-09 Thread Wijaya Edward
Hi, > Add this line: > use lib '/home/sadm/lib/site_perl'; > At the top of your script,I think it should work well. As I mentioned earlier. I did. The exact path as you stated above. Still won't work. Although doing $ perl -c helom.cgi works on plain cmdline (with/without "use lib"). But no

Re: Beginning to use the stricts and warnings

2007-04-09 Thread Jean-Rene David
* Chas Owens [2007.04.09 11:00]: > > for (my $i = 0; $i < @banks; $i++) > > If you must loop this way at least do it like this: > > for my $i (0 .. $#banks) {} > > But most likely you don't need to loop that way and it is better to > loop this way: > > for my $bank (@banks) {} I've been

Re: Problem Accessing Perl ModulesThrough .htaccess

2007-04-09 Thread Jeff Pang
Tried that too. Still give the same problem. Although I thought it's the .htaccess job to locate those Perl's lib path. Hello, Add this line: use lib '/home/sadm/lib/site_perl'; At the top of your script,I think it should work well. -- mailto: [EMAIL PROTECTED] http://home.arcor.de/je

RE: Problem Accessing Perl ModulesThrough .htaccess

2007-04-09 Thread Wijaya Edward
Hi Jeff, > By the way,why don't include this line in your CGI script? > use lib '/the/module/path'; Tried that too. Still give the same problem. Although I thought it's the .htaccess job to locate those Perl's lib path. >you may need to set the "SetEnv" direction in the httpd.conf. How do yo

Re: Beginning to use the stricts and warnings

2007-04-09 Thread Jeff Pang
Hello, 2007/4/9, Rodrigo Tavares <[EMAIL PROTECTED]>: Hello, I put in my code: if i put in code : my @ARGV = ('a'); Come the message: You shouldn't use 'my' to declare the @ARGV since @ARGV is a special package variable in Perl.Instead you can access this array directly,don't need the de

Re: Beginning to use the stricts and warnings

2007-04-09 Thread Chas Owens
On 4/9/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: Hello, I put in my code: use strict; use warnings; So I declared many variables. By example counters and arrays. Using my. My script start the postgres. ./postgresql.pl start|stop|reload|status I'm using this below structure. When I run t

Re: Verified for Spam -RODIN- I2R: Problem Accessing Perl Modules Through .htaccess

2007-04-09 Thread Jeff Pang
Don't look at your config carefully.But if I remembered that correctly,you may need to set the "SetEnv" direction in the httpd.conf. By the way,why don't include this line in your CGI script? use lib '/the/module/path'; 2007/4/9, Wijaya Edward <[EMAIL PROTECTED]>: Dear experts, I have the f

Beginning to use the stricts and warnings

2007-04-09 Thread Rodrigo Tavares
Hello, I put in my code: use strict; use warnings; So I declared many variables. By example counters and arrays. Using my. My script start the postgres. ./postgresql.pl start|stop|reload|status I'm using this below structure. When I run the script como the message : Use of uninitialized valu

OT: html checkbox question

2007-04-09 Thread jm
below is a very simple testing script to display and select multiple options from a list of checkboxes. the first grouping all use the same checkbox name "sitelist" for each checkbox, the second grouping uses a different name for each checkbox. the first group only returns the first selection, r

Verified for Spam -RODIN- I2R: Problem Accessing Pe rl Modules Through .htaccess

2007-04-09 Thread Wijaya Edward
Dear experts, I have the following simple Perl script (called "hellom.cgi"): __BEGIN__ #!/usr/bin/perl use CGI qw/:standard :html3/; use CGI::Carp qw( fatalsToBrowser ); $CGI::POST_MAX=1024 * 100; # max 100K posts1 #-- # BEGIN { # if ( $EN