We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
One way would be to add
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 here 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. 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. UPDATE: Removed the comma per the comment below btw- you are bieng no more 'picky' than perl itself <g> In reply to Re: using strict and functions
by Desdinova
|
|