Hack-R Hack-R - 6 months ago 4
Perl Question

Why doesn't Perl see my file in the working Windows directory?

I'm using the current release of Strawberry Perl and Windows Server 2008.

For some reason Perl doesn't seem to find files in the current working directory:

test.csv train.csv

F:\temp\hackr\e>perl -ne 'print if (rand() < .01)' train.csv
The system cannot find the file specified.

mob mob

On the Windows command line, use double quotes around command line arguments that need quoting.

perl -ne "print if (rand() < .01)" train.csv