on Tue, 21 May 2002 13:22:23 GMT, [EMAIL PROTECTED] wrote:
> Okay thanks, I added "my $dbh;" prior to the subroutine and am
> still receiving the same error. Here is the code:
> sub db_connect
> {
> use DBI;
> use strict;
>
> my $db_connect = 'DUMY';
> my $dbh = DBI->connect("dbi:Oracle:$db_connect","FMC","FMC")
> or die "Database connection not made: $DBI::errstr";
> }
Get rid of the 'my' in 'my $dbh = ...' here.
Then read M-J. Dominus' "Coping With Scoping" article at
<http://perl.plover.com/FAQs/Namespaces.html>
very carefully.
You may also want to
use warnings;
use strict;
while developing your programs.
--
felix