Hack-R
Hack-R

Reputation: 23214

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:

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.

Upvotes: 2

Views: 377

Answers (1)

mob
mob

Reputation: 118605

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

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

Upvotes: 7

Related Questions