while( ){ # = for each line of the file chomp; # (remove trailing newline) my ($name,$pass) = split /\|/; # = split up into name and password if( $name eq $wanted_name ){ # = if the name is the needed name if( $pass eq $submitted_passord ){ # = verify the password # = if it is correct last; # = end the loop successfully } else { # = otherwise die "bastard $name gave me wrong password!\n" # = cry for help or simply die of error ... } } # = if the name doesn't match # go to the next line }