in reply to Re: Re: Re: Re: Re-calling in a list of variables into different .pl's
in thread Re-calling in a list of variables into different .pl's

The use vars in the main program should be unnecessary.

You may want to just use a hash instead of separate variables.

Other than that, you can get rid of the our() list by saying something like our @EXPORT; use vars @EXPORT=qw/ list of var names /;. You could do something with eval to get the split working, but I wouldn't bother (unless the var names are going to change a lot).

  • Comment on Re: Re: Re: Re: Re: Re-calling in a list of variables into different .pl's
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re-calling in a list of variables into different .pl's
by Lori713 (Pilgrim) on Feb 10, 2004 at 21:57 UTC
    The use vars in the main program was necessary (because of the errors it generated without it regarding undeclared variables) until I changed it as you suggested to:
    our @EXPORT; use vars @EXPORT=qw/ list of var names/;
    I now only have two lists, both of them in the package (where it's easy to keep them synchronized (love that copy & paste!)).

    Thanks so much for your help!

    Lori