"my" variable $foo masks earlier declaration in same scope at ./b.pl line 13. syntax error at ./b.pl line 16, near "print" Execution of ./b.pl aborted due to compilation errors.