use strict;
require 'config.pl';
use vars qw($usr $pwd $host);
print $usr, $pwd, $host;

this runs with no errors whatsoever....

what i DO want is a trailing ' at the "$pwd = 'bar'; " thing

Jos

----- Original Message -----
From: "Peter Scott" <[EMAIL PROTECTED]>
To: "Jos I. Boumans" <[EMAIL PROTECTED]>; "Tim Musson" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 12:37 AM
Subject: Re: Re[3]: Best practice for config file use?


> At 12:15 AM 6/28/01 +0200, Jos I. Boumans wrote:
>
> >1.    script that holds global vars, let's call it config.pl
> >
> >### config.pl ###
> >$usr = 'foo';
> >$pwd = 'bar;
> >$host = 'bleh.com';
> >
> >### in your script you'd say: ###
> >require 'config.pl'
> >use vars qw($usr $pwd $host); #these 3 vars are 'used' by your config
file,
> >thus poluting your namespace that way
>
> I think you want the "usr vars" to precede the "require".
> --
> Peter Scott
> Pacific Systems Design Technologies
> http://www.perldebugged.com
>
>

Reply via email to