in reply to Sharing variables
It's not awful for small programs, but it's not great. The $::scalar_name syntax only works if you define a package global in the main package. Sometimes that's useful, but I try to group code that needs to access certain objects and data structures all together in the same or related modules and classes.
This is starting to sound pretty vague, but my rule is "This isn't bad for short programs, but there are better ways to organize larger programs."
|
|---|