in reply to About (my, local, ours) declaring variables

There's really no relation between those functions, and my is the only one which declares variables. In short,

Now, you're probably wondering when to use lexical variables and when to use package variables.

Again in short, you want to use lexicals whenever possible. There are a few situations that mandate using pacakge variables:

The variables in perlvar are package variables, so you can use local on them.