in reply to Re: Re: Using External Subroutines
in thread Using External Subroutines

is that really the only way to do it? no way to make variables global or anything ?

Replies are listed 'Best First'.
Re: Re: Re: Re: Using External Subroutines
by data64 (Chaplain) on Nov 19, 2001 at 03:06 UTC
    well, if you want to do this and really, really want to avoid creating a proper module using exporter....

    You can do something like this:
    $name = \config::name;
    in your calling script. Note that $name cannot be declared by "my" in config.pl

    Again, I want to stress I would never use something like this. It is some much easier, simpler and safer to convert config.pl into a module and then use exporter to expose whatever you need.
Re: Re: Re: Re: Using External Subroutines
by hopes (Friar) on Nov 19, 2001 at 04:09 UTC
    Of course you can,
    but maybe you'll get in trouble with global variables.
    For example, if you decide not to use strict and warnings, you won't declare your variables...

    You want this?
    Of course I don't in a "huge" set of scripts

    Cheers
    Hopes