#!/usr/bin/perl -w
$x = 0;
while($x < 5) {
        $x++;
        print "hi $x\n";
        print "before next;\n";
                if ($x == 2) { next; }
        print "after next  $x\n";
        if ($x == 4)
        { print "before last \n" ;
                last;
                print "after last\n " ;
        }
        if ($x == 3){
                print "before redo\n";
                redo;
                print "after redo\n";
        }
        print "bottom of loop\n";

} continue { print "doing my continue thing\n"; }

