Re: Variables in external file

2005-02-28 Thread Mark Wheeler
Hi all, Thanks for all you input. I'm mulling it all over to decide what works best for me. That's the beauty of it all - there's always more than one way to get what you want. Thanks again. Mark On Feb 18, 2005, at 11:37 AM, Rich Morin wrote: At 8:39 AM -0800 2/18/05, Mark Wheeler wrote: Is it

Re: Taint mode (was Re: Variables in external file)

2005-02-20 Thread Peter N Lewis
Which reminds me... I've been using the #!/usr/bin/env perl shebang for easier distribution, but env doesn't like switches. Is there a way to set taint mode via `use` or the like (ala use warnings; for -w). I can't seem to locate anything in the manuals other than the -T flag. Correct me if I'm wro

Re: Taint mode (was Re: Variables in external file)

2005-02-19 Thread Ken Williams
On Feb 19, 2005, at 1:51 AM, wren argetlahm wrote: Which reminds me... I've been using the #!/usr/bin/env perl shebang for easier distribution, but env doesn't like switches. Is there a way to set taint mode via `use` or the like (ala use warnings; for -w). No. By definition, any switch in the scr

Taint mode (was Re: Variables in external file)

2005-02-18 Thread wren argetlahm
--- Bruce Van Allen <[EMAIL PROTECTED]> wrote: > And you will avoid the stress of combing back > through a program you need > to make secure, trying to find the elusive points > where the -T switch > tenaciously challenges you, an enterprise in which > you may risk losing > your appreciation of log

Re: Variables in external file

2005-02-18 Thread Ken Williams
On Feb 18, 2005, at 10:39 AM, Mark Wheeler wrote: Hi, Just a quick question. Is it possible to have a bunch of variables in a separate file and then require that file in the script file? It's generally not a wise choice. Better to use something like Data::Dumper to write the data to a file, then

Re: Variables in external file

2005-02-18 Thread Rich Morin
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 -

Re: Variables in external file

2005-02-18 Thread Mark Wheeler
Hi, Well, I checked the line endings. They are unix. It must be permissions, because the syntax check came up good, and the error is a 500. I've set both to 755. Perl version is 5.8.1 (standard install). I tried the "use vars qw/@list/;", but that didn't seem to do the trick either. I know this

Re: Variables in external file

2005-02-18 Thread Bruce Van Allen
On 2005-02-18 Mark Wheeler wrote: >Ok... I made the changes, but still no luck. Here is the script as it >is, now. > >-- >test.cgi >-- > >#!/usr/bin/perl -w > >use strict; > >our @list; >require 'variables.conf'; > >fo

Re: Variables in external file

2005-02-18 Thread John Delacour
At 4:54 pm + 18/2/05, Neil Bowers wrote: You'll need to declare the variable in the script ('our', not 'my'), before you require variables.conf I don't think it needs to be before; for (our @list) { print } will do the trick. JD

Re: Variables in external file

2005-02-18 Thread Mark Wheeler
Ok... I made the changes, but still no luck. Here is the script as it is, now. -- test.cgi -- #!/usr/bin/perl -w use strict; our @list; require 'variables.conf'; foreach (@list) { print; } exit; --

Re: Variables in external file

2005-02-18 Thread Neil Bowers
Just a quick question. Is it possible to have a bunch of variables in a separate file and then require that file in the script file? Let me give you and example. [...] require variables.conf [...] variables.conf [...] my @list; [...] When I try the above script, I get an error - "Global variable

Re: Variables in external file

2005-02-18 Thread Joel Rees
On 2005.2.19, at 01:39 AM, Mark Wheeler wrote: Hi, Just a quick question. Is it possible to have a bunch of variables in a separate file and then require that file in the script file? Let me give you and example. -- Script file -