SPUG: Unitialized values

Paul Farrall PFarrall at getthere.com
Thu Jun 1 18:01:58 CDT 2000


Peter,

It looks like you are calling "$dbSystem" when it's not defined.
You might want to try checking return values for line 19:

19 my $dbSystem =
DBI->connect("DBI:mysql:database=Development;host=localhost","root","");

Hope this helps!

Paul Farrall
Getthere.com


-----Original Message-----
From: Peter Darley [mailto:PDarley at serviceintelligence.com]
Sent: Thursday, June 01, 2000 2:44 PM
To: SPUG (E-mail)
Subject: SPUG: Unitialized values


Friends,
	I have a script that is always throwing up warnings, and I can't
for the life of me figure out what it's warning me about.  I tried to
find a description of the error in the perl man pages, but I'm still
pretty new to it and didn't have any luck.  Anyone have any ideas?  The
code is as follows, minus its subs (I added the numbering for
reference):

1  #!/usr/bin/perl -w
2
3  ###############################################
4  # 
5  # Page for setting up a new data source.  
6  # It does several things:
7  #	1)  Collects information about what client it goes too, what the
name of it is, and gets the text file that contains the data
8  #	2)  Collects information about the structure of the data
9  #	3)  Imports data according to it's structure
20 #
11 ###############################################
12
13 use strict;
14 use CGI qw(:standard);
15 use DBI;
16 
17 require "./DashboardLib.pl";
18
19 my $dbSystem =
DBI->connect("DBI:mysql:database=Development;host=localhost","root","");
20 
21 
22 #Start Main
23 print header();
24 
25 if (param('Action') eq 'GetTableStructure') {print
GetTableStructure($dbSystem)}
26 elsif ((param('Action') eq 'StartImport') || (!param())) {print
StartImport($dbSystem)};
27 
28 $dbSystem->disconnect();
29 #End Main

	The errors that I'm getting are:

Use of uninitialized value at /usr/local/apache/cgi-bin/SetupDB.pl line
25.
Use of uninitialized value at /usr/local/apache/cgi-bin/SetupDB.pl line
26.

	Any help y'all could provide would be much appreciated.
Thanks,
Peter Darley

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 For Subscriptions, Email to majordomo at pm.org:  ACTION  spug-list  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
 Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
 For Subscriptions, Email to majordomo at pm.org:  ACTION  spug-list  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email address





More information about the spug-list mailing list