pasky / speedread

A simple terminal-based open source Spritz-alike (per-word RSVP aligned on optimal reading points)
MIT License
1.06k stars 93 forks source link

Use of undefined value #14

Open alancam opened 10 years ago

alancam commented 10 years ago

Hello,

When I try and run your script under Strawberry Perl, I get undefined value errors on $ch, $self and ver.

They seem to loop over and over, giving endless errors.

Any ideas?

bfontaine commented 8 years ago

I have the same issue with the 1.0 release when running the script without a tty. You can reproduce with:

echo foo | ssh localhost /usr/local/bin/speedread

(replace /usr/local/bin/speedread with your binary location)

Update: here is the output:

$ echo foo | ssh localhost /usr/local/bin/speedread
Use of the encoding pragma is deprecated at /usr/local/bin/speedread line 39.
stty: /dev/tty: Device not configured
                    v
                   foo                                          250 wpmUse of uninitialized value in vec at /usr/local/bin/speedread line 252, <> line 1.
getc() on closed filehandle $self at /usr/local/bin/speedread line 260, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 158, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 161, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 164, <> line 1.
Use of uninitialized value in vec at /usr/local/bin/speedread line 252, <> line 1.
getc() on closed filehandle $self at /usr/local/bin/speedread line 260, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 158, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 161, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 164, <> line 1.
Use of uninitialized value in vec at /usr/local/bin/speedread line 252, <> line 1.
getc() on closed filehandle $self at /usr/local/bin/speedread line 260, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 158, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 161, <> line 1.
Use of uninitialized value $ch in string eq at /usr/local/bin/speedread line 164, <> line 1.
…snip…