uninitialized variable

2005-11-01 Thread Adedayo Adeyeye
Hello, I'm getting an error when trying to run a script. Part of the scripts is Line 10 my $action = param('form_action'); . Line 14 Search_DB() if($action eq 'search'); The error I get is: [Tue Nov 1 16:28:41 2005] connect_script.cgi: Use of uninitialized value in string eq at

Re: uninitialized variable

2005-11-01 Thread Chris Devers
On Tue, 1 Nov 2005, Adedayo Adeyeye wrote: my $action = param('form_action'); Try setting a default value when 'form_action' isn't specified: my $action = param('form_action') or ''; Or set it to 0, or 'do nothing' or undef, or whatever is appropriate. -- Chris Devers -- To

Re: uninitialized variable

2005-11-01 Thread DBSMITH
Subject Please respond to Re: uninitialized variable [EMAIL PROTECTED] l.org

Re: uninitialized variable

2005-11-01 Thread Sara
my $action = param('form_action') || 'any_default_value'; HTH, Sara. - Original Message - From: Chris Devers [EMAIL PROTECTED] To: Adedayo Adeyeye [EMAIL PROTECTED] Cc: beginners-cgi@perl.org Sent: Tuesday, November 01, 2005 8:42 PM Subject: Re: uninitialized variable On Tue, 1

Re: uninitialized variable

2005-11-01 Thread Chris Devers
On Tue, 1 Nov 2005 [EMAIL PROTECTED] wrote: from Perl Best Practices use my $action = param('form_action') | | q{ } instead of or ' ' Good catch. Yes, that's clearer than simple apostrophes. However, you probably didn't really mean | | over ||, right ? :-) I still think

RE: uninitialized variable

2005-11-01 Thread Dave Doyle
On Tuesday, November 01, 2005 Chris Devers wrote: On Tue, 1 Nov 2005 [EMAIL PROTECTED] wrote: from Perl Best Practices use my $action = param('form_action') | | q{ } instead of or ' ' Good catch. Yes, that's clearer than simple apostrophes. However, you probably didn't really

Re: uninitialized variable

2005-11-01 Thread DBSMITH
Subject Re: uninitialized variable Please respond to [EMAIL PROTECTED] l.org

Re: uninitialized variable

2005-11-01 Thread Shawn Corey
Adedayo Adeyeye wrote: Hello, I'm getting an error when trying to run a script. Part of the scripts is Line 10 my $action = param('form_action'); . Line 14 Search_DB() if($action eq 'search'); The error I get is: [Tue Nov 1 16:28:41 2005] connect_script.cgi: Use of uninitialized

Re: uninitialized variable

2005-11-01 Thread David Dorward
On Tue, Nov 01, 2005 at 04:34:45PM +0100, Adedayo Adeyeye wrote: I'm getting an error when trying to run a script. Part of the scripts is my $action = param('form_action'); if($action eq 'search'); The error I get is: Use of uninitialized value in string eq at connect_rodopi.cgi line 14.

RE: uninitialized variable

2005-11-01 Thread Adedayo Adeyeye
To: beginners-cgi@perl.org Subject: Re: uninitialized variable On Tue, Nov 01, 2005 at 04:34:45PM +0100, Adedayo Adeyeye wrote: I'm getting an error when trying to run a script. Part of the scripts is my $action = param('form_action'); if($action eq 'search'); The error I get is: Use

RE: uninitialized variable

2005-11-01 Thread Chris Devers
On Tue, 1 Nov 2005, Adedayo Adeyeye wrote: I'm also trying to connect to an mssql db from a cgi, and I'm getting the following error: Cannot connect: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (SQL-08001)[Microsoft][ODBC SQL Server

RE: uninitialized variable

2005-11-01 Thread Adedayo Adeyeye
Beginners - CGI List Subject: RE: uninitialized variable On Tue, 1 Nov 2005, Adedayo Adeyeye wrote: I'm also trying to connect to an mssql db from a cgi, and I'm getting the following error: Cannot connect: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access

Re: question about uninitialized variable

2003-03-09 Thread drieux
On Friday, Mar 7, 2003, at 10:42 US/Pacific, Tony Bandy wrote: [..] Just a beginning test page where the end-user submits a name and gets a page back with that name in it. The page works,however, the warning I keep getting is: Use of uninitialized value in concatenation (.) or string... that

question about uninitialized variable

2003-03-07 Thread Tony Bandy
Hello everyone, Fairly new to the list here (and perl), so if this is an inappropriate post, please forgive me. I've got the Learning Perl book plus a few others...but I'm still scratching my head over this one. Just a beginning test page where the end-user submits a name and gets a page back

RE: question about uninitialized variable

2003-03-07 Thread Hughes, Andrew
, 2003 1:43 PM To: [EMAIL PROTECTED] Subject: question about uninitialized variable Hello everyone, Fairly new to the list here (and perl), so if this is an inappropriate post, please forgive me. I've got the Learning Perl book plus a few others...but I'm still scratching my head over this one

Re: question about uninitialized variable

2003-03-07 Thread Wiggins d'Anconia
, and what line of code is that? This will give you an idea of which value is uninitialized. http://danconia.org -Original Message- From: Tony Bandy [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 1:43 PM To: [EMAIL PROTECTED] Subject: question about uninitialized variable Hello everyone