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
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
Chris Devers
[EMAIL PROTECTED]
m
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
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
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
Chris Devers
[EMAIL PROTECTED]
m
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
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.
Thanks. That's cleared now.
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
Driver][DBNETLIB]ConnectionOpen
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
Thanks once again.
I'm running this script on two different machines, both separate from the
machine the Database is running on.
It works on one Server and it fails on the other. I believe that, it's
trying to connect to a local database on the system it fails rather than
connecting to an
Hi all
Just a thought, is it possible to compile perl code in to some type of binary
format file, and then perl can execute the bin file.
Just somthing I was thinking.
Kind Regards
Brent Clark
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Tue, 1 Nov 2005, Brent Clark wrote:
Just a thought, is it possible to compile perl code in to some type of
binary format file, and then perl can execute the bin file.
Just somthing I was thinking.
http://www.google.com/search?q=perl+compiler
But then, I'm sure you spent the three
As far as I know perlcc is the only perl compiler, but it is still in a kind
of alpha stage, not developed, and it doesn't work really.
There are other programs that don't compile the perl code, but create a
binary executable file which includes the program, the perl interpreter, and
all the
On 10/31/05, Matthew Sacks [EMAIL PROTECTED] wrote:
Trying to use Mail::Mailer, in the sample code below.
i) if I put -T on the first line invoking Perl, I get
an error like too late for -T option
?
ii) The program runs but the mail never arrives. The
eval block checks always succeed.
Jay == Jay Savage [EMAIL PROTECTED] writes:
Jay The new version prevents anyone but the superuser from changing a
Jay file's ownership. Actually the change was to the chown and lchown
Jay system calls in various kernels (I think Linux was the first, maybe
Jay Solaris?) not to chown itself.
You
On 01 Nov 2005 09:01:02 -0800, Randal L. Schwartz merlyn@stonehenge.com wrote:
Jay == Jay Savage [EMAIL PROTECTED] writes:
Jay The new version prevents anyone but the superuser from changing a
Jay file's ownership. Actually the change was to the chown and lchown
Jay system calls in various
Hi all,
I'm in the process of writing a rather complex parser script to parse
nessus output, can be anything from:
results|192.168.1|192.168.1.131|https (443/tcp)|10330|Security Note|A
web server is running on this port through SSL\n
to
results|192.168.1|192.168.1.131|https
Please don't top post, and please send replies to the list.
On 11/1/05, Matthew Sacks [EMAIL PROTECTED] wrote:
Any ideas about why -wT is producing
too late for -T option
-m
--- Jay Savage [EMAIL PROTECTED] wrote:
On 10/31/05, Matthew Sacks
[EMAIL PROTECTED] wrote:
Trying to use
On Nov 1, Michael Gargiullo said:
I'm in the process of writing a rather complex parser script to parse
nessus output, can be anything from:
results|192.168.1|192.168.1.131|https (443/tcp)|10330|Security Note|A
web server is running on this port through SSL\n
to
Hello:
I got some advice on how to obtain a listing of all the files on a hard drive.
The advice was to use File::find. I looked at the perl document and I am a
little confused and so a simple example would be nice. I would like to get the
file name, directory path, size and date of last
Here is a fairly simple one I used recently. In my case I used
finddepth (searches from the bottom up instead of top down) because I
was renaming folders and File::Find couldn't chdir to the folder after I
had changed the name. find() works the same way.
In the example below, finddepth runs my
23 matches
Mail list logo