use File::Spec; my $file_path=File::Spec->catfile('C:','Path','To','File.exe'); print "$file_path\n";