#!/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";
In reply to Re^3: do until loop breaks before meeting the condition
by choroba
in thread do until loop breaks before meeting the condition
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |