in reply to Re^2: loop problem
in thread loop problem
What error does strict throw? Works fine for me as-is on 5.26.1.
Anyway, here's an example of how to get what you want:
my $radius = -1; until ($radius >= 0){ say "What is the radius?"; $radius= <STDIN>; chomp ($radius); say "radius must be >= 0. Try again..."; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: loop problem
by WisDomSeeKer34 (Sexton) on Jun 12, 2018 at 17:13 UTC | |
by stevieb (Canon) on Jun 12, 2018 at 17:18 UTC | |
by WisDomSeeKer34 (Sexton) on Jun 12, 2018 at 17:33 UTC | |
by poj (Abbot) on Jun 12, 2018 at 18:05 UTC | |
by stevieb (Canon) on Jun 12, 2018 at 18:14 UTC | |
by stevieb (Canon) on Jun 12, 2018 at 18:03 UTC |