c has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to call in variables from an external file, however with use strict; in place, I get the gong saying that the variables need to be declared. Is there an easy way to do this? I have a script that is getting to have a large number of user-definable variables that I would like to read from an external file, but
#!/usr/bin/perl -w use strict; require "script_options.txt";
just doesnt seem to be the way to go. I'm not up for digging in and reading from an xml config file, I just need something simple that lets a user define something like my $mtu = "1500"; in a seperate file.
thanks! -c
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Calling variables from external file, with strict
by danger (Priest) on Jun 28, 2002 at 01:11 UTC | |
Re: Calling variables from external file, with strict
by chromatic (Archbishop) on Jun 28, 2002 at 00:48 UTC | |
Re: Calling variables from external file, with strict
by erikharrison (Deacon) on Jun 28, 2002 at 00:53 UTC | |
Re: Calling variables from external file, with strict
by bronto (Priest) on Jun 28, 2002 at 09:57 UTC | |
Re: Calling variables from external file, with strict
by krisahoch (Deacon) on Sep 06, 2002 at 18:21 UTC | |
Re: Calling variables from external file, with strict
by zentara (Archbishop) on Jun 28, 2002 at 16:12 UTC | |
by zentara (Archbishop) on Jun 28, 2002 at 17:37 UTC |
Back to
Seekers of Perl Wisdom