http://www.perlmonks.org?node_id=1033998
vyeddula has asked for the wisdom of the Perl Monks concerning the following question:

Case1:
do { $i=0; print"the value of i inside the loop is :$i\n"; $i++; }until($i<=10)

On executing above script i am getting output the value of i inside the loop is :0 .I am expecting the loop should execute.Please clarify

Case2:
use strict; my $i=5; do { print"the value of i is :$i\n"; $i--; }until($i<=0);

This program is executing as expected

Case3:
use strict; my $i=5; print "the value of i outside the loop is $i\n"; do { print"now i entered inside the loop \n"; my $i=10; print "the value of i inside the loop is :$i\n"; $i--; }until($i<=0);

This is failing to go through the loop. Please clarify why scoping inside the loop is not getting triggered.