Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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:


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
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
    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.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-11-30 08:17 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (765 votes), past polls