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
Chris Devers [EMAIL PROTECTED] m

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
Chris Devers [EMAIL PROTECTED] m

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
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

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
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

perl compilers

2005-11-01 Thread Brent Clark
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]

Re: perl compilers

2005-11-01 Thread Chris Devers
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

Re: perl compilers

2005-11-01 Thread Octavian Rasnita
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

Re: Mail::Mailer

2005-11-01 Thread Jay Savage
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.

Re: How to change the Owner of a file

2005-11-01 Thread Randal L. Schwartz
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

Re: How to change the Owner of a file

2005-11-01 Thread Jay Savage
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

regex issues

2005-11-01 Thread Michael Gargiullo
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

Re: Mail::Mailer

2005-11-01 Thread Jay Savage
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

Re: regex issues

2005-11-01 Thread Jeff 'japhy' Pinyan
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

File::Find implementation

2005-11-01 Thread andrewmchorney
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

RE: File::Find implementation

2005-11-01 Thread Timothy Johnson
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