in reply to do-until: Can't "next" outside a loop block.
instead of do why not try something like:
untested
while ($key ne "q") { $index_cur = int( rand($last_abc_letter) ); unless ($index_cur == $index_prev) { $index_prev = $index_cur; print "$letter[$index_cur]\n"; $key = ReadKey(0); } }
I suggest reading perlintro if you haven't already. Also, if you're not already...
use strict; use warnings;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: do-until: Can't "next" outside a loop block.
by humble (Acolyte) on Nov 30, 2012 at 04:58 UTC | |
by davido (Cardinal) on Nov 30, 2012 at 05:42 UTC |