go ahead... be a heretic | |
PerlMonks |
Re^6: Perl CGI and SQL statementsby osunderdog (Deacon) |
on Apr 19, 2006 at 11:56 UTC ( [id://544330]=note: print w/replies, xml ) | Need Help?? |
my $db = new Win32::ODBC('$DSN');
The declaration of $db is too low. The variable is being declared in an if check and it's being referenced in an outer scope. Declare $db higher up in a block where it's visible to both the case where you assign it and where you reference it. The outer scope would work, that's where you've defined the $cgi variable. Hazah! I'm Employed!
In Section
Seekers of Perl Wisdom
|
|