Hi<br><br>I have this piece of code that checks every single pair of userid's and passwoard in an array, however even if the userID is found in the first line, it will still go on to check the whole of the rest of the array.<br><br>foreach $user (@users){<br>$_ = $user;<br>if ( /$userid\#(.*?)\#/ )<br> {<br> $password = $1;<br> }<br>else<br> {<br> $nouser = 1;<br> }<br>}<br><br>Is there anyway of terminating the serarch (exiting the loop) when the userID is found?<br><br>Thanks<br>Will<br> <p>fortytwo<br><a href=mailto:will@hellacool.co.uk>will@hellacool.co.uk</a><br><a href= test site</a><br>