in reply to Re^3: What's the point of a labeled block without a loop?
in thread What's the point of a labeled block without a loop?

By labelling it, you're giving a reason for a bare-block.

In this specific case, it can be done without a bare block:

my $age; do { print "Please enter your age: "; chomp ($age = <STDIN>); } while $age =~ /\D/; print "Got it: $age\n"; __END__ Please enter your age: hi there Please enter your age: 123abc Please enter your age: 99 Got it: 99

--
David Serrano