use File::Spec; my $dir=File::Spec->catdir('//server','share','folder','subfolder');