in reply to Re^2: how to declare a package variable
in thread how to declare a package variable

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:  <%-{-{-{-<