"my" variable $x masks earlier declaration in same scope at test.pl line 9 (#1) (W misc) A "my" or "our" variable has been redeclared in the current scope or statement, effectively eliminating all access to the previous instance. This is almost always a typographical error. Note that the earlier variable will still exist until the end of the scope or until all closure referents to it are destroyed. Found = in conditional, should be == at test.pl line 9 (#2) (W syntax) You said if ($foo = 123) when you meant if ($foo == 123) (or something like that).