in reply to How to verify array fields and print ONE message at the end

My recommendation would be to do that before you check anything else. Make it your first 'if' structure. Something like:
$found = 0; foreach $i (@indata) { chomp($i); ($username,$password) = split(/\|/,$i); if ($in{'oldname'} eq $username) { $found = 1; <i>do your other checks for data</i> . . . } } if (!$found) { print "You are not registered!"; }
This way, the only time you'll fall into your other data checks is when the user is verified as being in your database. If you get to the end of the list, and still can't find the user, then they must not be registered.