$year=1900; unless($year==2000){ #notice unless instead of until print "blah blah $year\n"; #now it works; $year++; } print "Done\n";