Why doesn't this path work to open a Windows file in PERL?
问题 I tried to play with Strawberry Perl, and one of the things that stumped me was reading the files. I tried to do: open(FH, "D:\test\numbers.txt"); But it can not find the file (despite the file being there, and no permissions issues). An equivalent code (100% of the script other than the filename was identical) worked fine on Linux. 回答1: As per Perl FAQ 5, you should be using forward slashes in your DOS/Windows filenames (or, as an alternative, escaping the backslashes). Why can't I use "C: