Wont this break if there is whitespace between key and the delimiter in the file?
I really would not like to have to know if there are 2 or 3 spaces between in $file. What if $user adds an entry with 4 spaces, while I expect them to be 2 or 0?