while( 1 ) { lock(@chat); cond_wait(@chat); last unless ( "@chat" !~ /$ID\s$kill/ ); lock($Elm); ...