Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is the first time I've ever tried to use a config file like this and naturally it doesn't work.
In my login.pl script I have
In my config.pl script (which is in the same folder, I haverequire("config.pl") or die "error: $!";
And it errors out with####### # MySQL section ####### my $dbase = "estre_test"; my $mysql_user = "estre_admin"; my $mysql_pass = "pass";
I'm not sure what I'm doing wrong. The OR DIE isn't catching so I'm assuming it can find the file BUT I used a filename that I knew didn't exist and it DID NOT FAIL. So I have absolutely no idea what's wrong. All the files are in the same folder and chmoded to 755.Global symbol "$dbase" requires explicit package name at login.pl line + 32. Global symbol "$mysql_user" requires explicit package name at login.pl + line 32. Global symbol "$mysql_pass" requires explicit package name at login.pl + line 32. Execution of login.pl aborted due to compilation errors.
Can you my variables in a central config file (that's what I'm trying to do)?.
Thanks for your help
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: requiring files
by Animator (Hermit) on Feb 15, 2005 at 20:49 UTC | |
by Anonymous Monk on Feb 15, 2005 at 21:10 UTC | |
by Anonymous Monk on Feb 15, 2005 at 21:15 UTC | |
by Animator (Hermit) on Feb 15, 2005 at 21:35 UTC | |
by Anonymous Monk on Feb 15, 2005 at 21:58 UTC | |
|
Re: requiring files
by holli (Abbot) on Feb 15, 2005 at 22:09 UTC | |
|
Re: requiring files
by RazorbladeBidet (Friar) on Feb 15, 2005 at 20:41 UTC |