> -Original Message-
> From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 10:21 AM
> To: 'Bob Showalter'; Camilo Gonzalez; [EMAIL PROTECTED]
> Subject: RE: Using strict and configuration files
>
>
> So the following ar
So the following are equivalent:
use vars qw(foo)
our $foo = ""
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:17 AM
To: 'Camilo Gonzalez'; [EMAIL PROTECTED]
Subject: RE: Using strict and configuration files
>
> -Original Message-
> From: Camilo Gonzalez [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 10:16 AM
> To: 'Bob Showalter'; 'Octavian Rasnita'; [EMAIL PROTECTED]
> Subject: RE: Using strict and configuration files
>
>
> Bob,
>
;; [EMAIL PROTECTED]
Subject: RE: Using strict and configuration files
> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 28, 2000 4:32 AM
> To: [EMAIL PROTECTED]
> Subject: Using strict and configuration files
>
>
> Hi all,
&
> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 28, 2000 4:32 AM
> To: [EMAIL PROTECTED]
> Subject: Using strict and configuration files
>
>
> Hi all,
>
> I want to use:
>
> use strict;
>
> And I
Hi,
This is how I do it.
#!/usr/bin/perl -wT
use strict;
my $conf;
unless ($conf = do ('/path/to/config.pl')) {
die ("Could not open file");
}
print $conf->{'var1'}, "\n";
-
Then in a file called "config.pl"
{
var1 => "one",
var2 => "two"
}
-
The "unless" part is just to che
Hi all,
I want to use:
use strict;
And I want to use a configuration file in a Perl script.
The configuration file uses:
%page1=(
);
%page2=(
);
This way I get errors if I run the script because the variables are not
defined with "my".
I've tried putting in the configuration file: