in reply to Re: Re: Re: global variables
in thread global variables

so like this??
#!/usr/bin/perl use strict; use warnings; use "inc.conf"; our $var; print $var , "\n"; exit;
And the contents of inc.conf...
#!/usr/bin/perl use strict; use warnings; our $var = "blah"; 1;
Because I still get a syntax error. Forgive me if I am a bit dense :)

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: global variables
by tinita (Parson) on May 31, 2004 at 14:58 UTC
    no, as davidj said, ignore his post. change 'my' to 'our' and you're done. require is just fine.
    for more info read Fletch's post and see perlfunc for require and use.
Re: Re: Re: Re: Re: global variables
by Happy-the-monk (Canon) on May 31, 2004 at 14:58 UTC

    -   use "inc.conf";
    +   require "inc.conf";

    Your first try wasn't that bad.