note
Desdinova
One way would be to add <BR>
<code>
use vars qw($var1 @array2};
</code>
That will give you the effect of a global var (actually a package var.) Without strict complaining too much. There is a great discussion of this [use vars|here]
<BR><BR>
Another option would be to pass the functions a reference to the variable. See [perlref] for details on using references. In my opinion this is a better way because it makes your functions more usable in other programs.<BR>
Also if they are small vars you can just pass them to the function in your call. If it is a huge list you will get better performance with the reference though.<BR><BR>
<STRONG>UPDATE:</STRONG> Removed the comma per the comment below btw- you are bieng no more 'picky' than perl itself <g>
139560
139560