At Sun, 20 Oct 2002 18:46:19 +1000, John Ferlito wrote:
> require 'vars.pl';
> if($VAR) {
> do something
> }
>
> Now this all works but perl starts getting very upset if you turn on use
> strict or add a -w and don't declare variables before the require.
presumably your enclosing script know what variables might be set (and
it probably sets some defaults itself too), so there should be no
hassles in "predeclaring" the expected variables.
eg:
our $passwdfile = '/etc/passwd';
our $email;
require 'vars.pl';
if ($email) {
# send spam
}
otherwise, you'll have to declare "no strict 'vars'", since thats what
you're doing anyway.
--
- Gus
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug