From strongest to weakest points:
@ARGV is always populated - it's the arguments you've been passed. If you don't have any arguments, the list is empty - which is precisely populated with what is passed in. @INC could similarly be empty, but I'm sure it would still be created. (Of course you'd have serious other problems if @INC were empty, but we won't go there.) More realistically, %ENV could be empty, but it would still be created because it would be populated - by nothing, but populated nonetheless. Think of code like this:
no strict;
@ARGV = ();
use strict;
print scalar @ARGV;
This wouldn't trigger the error - think of the first two lines as what perl does in the case of no arguments, and the latter two as representative of doing something with that nothing.
@_ is populated - and localised - for each function call. The perl runtime has to create this to populate it. You don't create it - perl does.
$_ is created with @_ by actually creating *_. But that's just a nit.
$a and $b are wierd exceptions. I can't explain those. Sorry.
Note also that these are variables that are created at compile time, not runtime. $AUTOLOAD, besides being local to each package that it deals with, is created at runtime. |