in reply to Re^2: do until loop breaks before meeting the condition
in thread do until loop breaks before meeting the condition
#!/usr/bin/perl use warnings; use strict; use constant MAXBYTES => 5; $| = 1; MSG: print "Please be aware maximum length ${\MAXBYTES} characters!:\n +"; my $result; do { print "Send this text to clients:\n\n"; chomp ($result = <STDIN>); if (length($result) >= MAXBYTES) { print "\nYou have reached the limit of characters ", length $result, "!\n\n"; goto MSG } } until uc $result eq "END";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: do until loop breaks before meeting the condition
by thanos1983 (Parson) on Jun 08, 2014 at 14:57 UTC | |
by choroba (Cardinal) on Jun 08, 2014 at 15:06 UTC | |
by thanos1983 (Parson) on Jun 08, 2014 at 18:46 UTC |