Hi, bin zwar nicht pq, aber ich erlaube mir, auf die Dokumentation zu verweisen:
perldoc -f strict
http://perldoc.perl.org/strict.html#strict-vars
perldoc strict: strict varsThis generates a compile-time error if you access a variable that was neither explicitly declared (using any of my, our, state, or use vars ) nor fully qualified. (Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local variable isn't good enough.) See my, our, state, local, and vars.
use strict 'vars';
$X::foo = 1; # ok, fully qualified
my $foo = 10; # ok, my() var
local $baz = 9; # blows up, $baz not declared before
package Cinna;
our $bar; # Declares $bar in current package
$bar = 'HgS'; # ok, global declared via pragma
The local() generated a compile-time error because you just touched a global name without fully qualifying it.
Because of their special use by sort(), the variables $a and $b are exempted from this check.
meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!