At 8:39 AM -0800 2/18/05, Mark Wheeler wrote:
Is it possible to have a bunch of variables in a separate file
and then require that file in the script file?
Possible, yes. Advisable, no. I tend to use YAML (www.yaml.org)
for this sort of thing, as:
# some_data.yml
List:
- 1
- 2
- 3
- 4
- 5
Then, after loading the file, I access the data as:
foreach $item (@{ $r->{List} }) {
print $item;
}
YAML is easy to read and edit, maps well to Perl data structures,
is language-independent, loads safely, etc.
-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series