需要正则表达式或其他一些方法将 UNIX 路径转换为 DOS 路径。
我有
C:/My Document/Photo.gif
需要
C:\My Document\Photo.gif
最佳答案
#!/usr/bin/perl
use strict; use warnings;
use File::Spec::Win32;
print File::Spec::Win32->canonpath('C:/My Document/Photo.gif'), "\n";
关于perl - 如何将 UNIX 路径转换为 DOS 路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4505278/