As Brian mentioned, global variables are generally highly discouraged, 
as it usually leads to sloppy coding that is hard to refactor.

If you want to break up your script for easy maintenance, you should 
consider using:
1. libraries, or in perl teminology 'packages'
2. OOP, to abstract the logic into various specialised objects


Ben Eagle wrote:
>
> I am trying to break up a script for easy configuration,
>
> So I want to put all my global variables in a file call config.pl
>
> And on BuildReport.pl I add
>
> Require “config.pl”;
>
> In strict mode this doesn’t work I get error saying I never declared 
> my variables.
>
> I use our($this, $that);
>
> And still nothing
>
> Any suggestions??
>
> Ben Eagle
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to