简体   繁体   中英

run specific perl script from command line

Not that much experience programming, but I saw this open source code for one of those speed readers everyone is talking about and thought it would be cool to try to run it on my own computer.

The files are available here: https://github.com/pasky/speedread

I was wondering what exactly I should type into the command prompt to get the program running. I already have a perl interpreter on my computer. But I'm not sure how to get the program running. Sorry if this is a super noobish question.

I've tried

perl C:\speadread-master\speedread (and yes, it was on the C: drive)

I got the error:

Use of encoding pragma is deprecated at C:\speadread-master\speedread line 39.
'stts' is not recognized as an internal or external command, operable program of batch file. 
←[31mc←[0←[K

I also tried (because it appears in the gifs on github)

~/speedread$ head -n 21 tea.txt | ./speedread -w 250

I got the error:

'~' is not recognized as an internal or external command, operable program or batch file

In addition to amon 's comment , wo points out a strong dependency to Unix commands/display, you also misinterpreted the head command:

~/speedread$ is a Unix command prompt , with ~ refering to your HOME directory ( USERPROFILE in Windows). You are not supposed to type it.

The actual command is:

head -n 21 tea.txt | ./speedread -w 250

Adn you have an head.exe (Windows version of the unix command head ) in your git msysgit distribution ( bin/head.exe ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM