Perl getcwd ending forward slashes
问题 I am doing a Perl script to attach another variable to the end of the current working directory, but I am having problems with using the module. If I run getcwd from D:\ , the value returned is D:/ (with forward slash) If I run getcwd from D:\Temp\ , the value returned is D:/temp (without forward slash) This makes the situation quite tricky because if I simply do: use Cwd; $ProjectName = "Project"; # This is a variable supplied by the user $directory = getcwd().$ProjectName."\/"; print