Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: do while loops

by Anonymous Monk
on Oct 24, 2004 at 03:41 UTC ( [id://401962] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $value=5 <------ ok that is the problem it does not have ;
    do{
      print "$value\n";
      $value=$value-1;
    } while($value>10);
    
  2. or download this
    $value=5; # now have ;
    do{
      print "$value\n";
      $value=$value-1;
    } while($value>10);