@array = (# some values that could contain an error) MAIN:while(1) { # something to keep this non-existant # program running foreach(@array) { last MAIN if($_ eq 'some error'); } }