"my" variable $folderPath masks earlier declaration in same scope at C:\gash.pl line 17. "my" variable $folderPath masks earlier declaration in same scope at C:\gash.pl line 19. Unmatched right square bracket at C:\gash.pl line 14, at end of line syntax error at C:\gash.pl line 14, near "]" syntax error at C:\gash.pl line 68, near "print" Execution of C:\gash.pl aborted due to compilation errors.