BrowserUk has already answered this question pretty clearly here and here. I just want to re-emphasize that all three statements you give as examples above do the same thing: they create (if the variable didn't already exist) and assign to a global variable $A in the P package (or namespace), with the our statement further granting lexical visibility.
The $A = 'something'; statement is made illegal (due to all the foot injuries) by enabling strictures; see strict.
Give a man a fish: <%-{-{-{-<
In reply to Re^3: how to declare a package variable
by AnomalousMonk
in thread how to declare a package variable
by scigeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |