my $base = 'D:\Some\Specific\Folder\Archive\\'; # should be: my $base = 'D:/Some/Specific/Folder/Archive'; # a path to a directory or my $base = "D:/Some/Specific/Folder/Archive"; # a path to a directory # do not put a trailing '/' or '\' on a directory name # this is not needed and can confuse the shell # pre-pend a '/' when you expand the path my $new = "$base/$extra_path";