in reply to Requesting feedback

I give it a 9.3 on the fun scale... a 10.0 on the I'm-sick-cuz-I-have-entirely-too-much-time-on-my-hands scale. I might be doing something wrong with the package, but I thought you might be interested in the following errors I tripped across...
[jason@dnsops jason]$ ./play.pl Input string: Hello World Use of uninitialized value in string eq at Crypt/Playwright.pm line 31 +2, <STDIN> line 1. Use of uninitialized value in string eq at Crypt/Playwright.pm line 31 +2, <STDIN> line 1. Kurt: It is much heavier than it looks. Emilia: Do you think anyone will notice? Jane: Have you ever seen one of these? Karen: Well it looks like...I don't know what it looks like. Zeus: Do you think anyone will notice? Dan: It looks sort of squashed. [ Sheri writes a poem. ]

According to my search, here is the code from line 312:
if ( $chars[ $i + 1 ] eq "\n" || $chars[ $i + 1 ] eq "" ) { $out .= $t +emp . " " . RandomElement( \@pSpace ) . "\n" . StageDirections();
-fuzzyping

Replies are listed 'Best First'.
Re: Re: Requesting feedback
by cchampion (Curate) on Mar 26, 2002 at 08:43 UTC
    I found the same error. There is an "off by 1" problem when the input string does not end with a "\n".
    The counting variable $i is incremented by 2 at each loop, and decreased by one when a "\n" is met.
    Using "Hello world\n", it will work.


    cchampion