$/ = "\012"; open (FILE1, "users.txt") || print "Error occured while opening file"; while () { ($first,$second ) = split /:/; print $first; if ($login eq $first) { print $client "Sorry this username has been taken, try again!\n\r"; &login; }