in reply to Perl: Syntax Errors, Help Needed

you can start changing from use file :: basename to use File::Basename

Then you can add

use warnings; use diagnostics; # produce verbose warning diagnostics

and fix warnings you get.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.