in reply to Need help reading and writing to a file.

Nothing immediately jumps out at me. Beware of carriage returns some web browsers send in textareas. You might run a transliteration on the value of the "filecontents" field:

$INPUT{filecontents} =~ tr/\r//d;

Otherwise, perhaps the best you can do is to add an else clause:

if ($INPUT{account} eq $account_line) { # print ban message and such } else { warn "($INPUT{account}) didn't match <$account_line>\n"; }
Wrapping delimiters around variables lets you see if any whitespace has sneaked through.

(Side note: I'd use a tied hash instead of a flat file. It's much more efficient.)