提问人:Hack-R 提问时间:4/21/2016 更新时间:4/21/2016 访问量:362
为什么 Perl 在工作 Windows 目录中看不到我的文件?
Why doesn't Perl see my file in the working Windows directory?
问:
我使用的是 Strawberry Perl 和 Windows Server 2008 的当前版本。
由于某种原因,Perl 似乎在当前工作目录中找不到文件:
F:\temp\hackr\e>ls
test.csv train.csv
F:\temp\hackr\e>perl -ne 'print if (rand() < .01)' train.csv
The system cannot find the file specified.
答:
7赞
mob
4/21/2016
#1
在 Windows 命令行上,在需要引号的命令行参数周围使用双引号。
perl -ne "print if (rand() < .01)" train.csv
评论
0赞
Borodin
4/21/2016
@Hack-R:Linux 在命令行上接受双引号或单引号(具有不同的行为),但 Windows 坚持使用双引号
评论
perl
perl