Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: do-until: Can't "next" outside a loop block.

by marquezc329 (Scribe)
on Nov 26, 2012 at 06:47 UTC ( #1005577=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: do-until: Can't "next" outside a loop block.
Select or Download Code
Re^2: do-until: Can't "next" outside a loop block.
by humble (Acolyte) on Nov 30, 2012 at 04:58 UTC
    Thank You, marquezc329. Of course I could - but I have found the misbehave as I supposed and therefore gave my question. PS I think PERL's manuals are very cramped. - Written for the people who are the language developers rather than its users. - IMO.

      I haven't contributed much at all to the Perl development; I think maybe a POD patch or two, and several bug reports over the years. I'm not a developer of Perl. But as a user, I do consider Perl's POD to be Perl's second "killer app", right behind the CPAN.

      The POD may be dense at times. perlintro really shouldn't be, if you've got experience programming in some language. Like with most things, comprehending the documentation is one of those things that gets easier the more you work with it.


      Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005577]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-09-18 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls