in reply to Calling variables from external file, with strict

I've done it using "our".
In your config file, just declare each variable like:
$a =1;
$b=2;
etc. Then in your script:
#!/usr/bin/perl use strict; our ($a,$b); require config; print "$a\t$b\n";

Replies are listed 'Best First'.
Re: Re: Calling variables from external file, with strict
by zentara (Cardinal) on Jun 28, 2002 at 17:37 UTC
    Oops, I forgot, the config file must have a 1; as the last line; to satisfy the Perl gods.