File::Spec is your friend. Path with spaces are shaggy beasts and very bad idea.
Perlmonks have other similar questions and solutions like
this oneHtH
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.