Help for this page

Select Code to Download


  1. or download this
    # do stuff
    do {
        # the same 'do stuff' as above. 
    } while cond;
    
  2. or download this
    #! perl -slw
    use strict;
    ...
    c:\test>junk2
    1
    Can't "redo" outside a loop block at c:\test\junk2.pl line 7.
    
  3. or download this
    #! perl -slw
    use strict;
    ...
    3
    4
    5
    
  4. or download this
    LOOP:{
        ...
        redo LOOP;
    }
    
  5. or download this
    ## draw the diagonals
    for( my $x=0, my $y=0;     $i < $xMax; $x++, $y++ ) { draw( $x, $y ); 
    +}
    for( my $x=0, my $y=$yMax; $i < $xMax; $x++, $y-- ) { draw( $x, $y ); 
    +}