rogueFalcon has asked for the wisdom of the Perl Monks concerning the following question:
app.cfg
---------------------------
$username = "blah"; $password = "blinky"; $databaseName = "foo";
app.pl
----------------------------
#!/usr/bin/perl -w use strict; require 'app.cfg'; print "Username: $username\n";When I do this I get a message like this:
Global symbol "$username" requires explicit package name at ./app.pl line 6.
Is this a good approach?
How can I best include this data in all of my app scripts?
If I remove the 'use strict;' then it works but that is not acceptable. I have to use strict (company policy).
-- rogueFalcon
Why do you people insist on doing things sdrawkcab?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Config files
by maverick (Curate) on Dec 10, 2001 at 22:29 UTC | |
|
Re: Config files
by TomK32 (Monk) on Dec 10, 2001 at 22:40 UTC | |
|
Re: Config files
by Lucky (Scribe) on Dec 10, 2001 at 22:47 UTC | |
|
Re: Config files
by rob_au (Abbot) on Dec 11, 2001 at 05:28 UTC |