in reply to "my" variable masks earlier declaration in same scope
my $var; $var=1; my $var; $var=2; [download]
The second $var "masks earlier declaration in same scope". You declare the same variable name a second time.