For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > September 2005 > RE: Use of uninitialized value









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: Use of uninitialized value
Charles K. Clarkson

2005-09-14, 9:55 pm

DBSMITH@OhioHealth.com <mailto:DBSMITH@OhioHealth.com> wrote:

: it is on line 207...thx!
: "Use of uninitialized value in string eq at line 207"

: (See attached file: ASM_monitor.pl)


Are you certain the version you sent is the version
on the server?


This does not produce an error. (It is from the version
you sent.)

#!/usr/bin/perl

use strict;
use warnings;

use CGI qw(:standard), (-unique_headers);

my $q = CGI->new();

my $which_import = $q->param('action') || '';

if ($which_import eq 'Import STKvol') {
print "foo\n";
}

__END__


This *does* produce an error.

#!/usr/bin/perl

use strict;
use warnings;

use CGI qw(:standard), (-unique_headers);

my $q = CGI->new();

my $which_import = $q->param('action');

if ($which_import eq 'Import STKvol') {
print "foo\n";
}

__END__


HTH,

Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328



DBSMITH@OhioHealth.com

2005-09-15, 6:55 pm


"Charles K.
Clarkson"
<cclarkson@htcomp To
.net> <beginners-cgi@perl.org>
cc
09/14/2005 08:57
PM Subject
RE: Use of uninitialized value













DBSMITH@OhioHealth.com <mailto:DBSMITH@OhioHealth.com> wrote:

: it is on line 207...thx!
: "Use of uninitialized value in string eq at line 207"

: (See attached file: ASM_monitor.pl)


Are you certain the version you sent is the version
on the server?


This does not produce an error. (It is from the version
you sent.)

#!/usr/bin/perl

use strict;
use warnings;

use CGI qw(:standard), (-unique_headers);

my $q = CGI->new();

my $which_import = $q->param('action') || '';

if ($which_import eq 'Import STKvol') {
print "foo\n";
}

__END__


This *does* produce an error.

#!/usr/bin/perl

use strict;
use warnings;

use CGI qw(:standard), (-unique_headers);

my $q = CGI->new();

my $which_import = $q->param('action');

if ($which_import eq 'Import STKvol') {
print "foo\n";
}

__END__


HTH,

Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
****************************************
*****************************

you must be right b/c I have not seen any errors in
/var/apache/logs/error_log since yesterday.
If I do see anymore I will continue this thread.

thanks
derek



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com