while ( @work || @work < 1000 ) { # should ought to be && not || }