TITLE: A connected space which is neither locally connected nor path connected
QUESTION [6 upvotes]: This is Problem 3.19.3 of Dieudonné's Foundations of Modern Analysis (in my words). For $x$ a rational number, let $E_x=\{x\}\times\left[-1,0\right[$, and for $x$ an irrational number, let $E_x=\{x\}\times[0,1]$. Let $E=\bigcup_{x\in\mathbf{R}}E_x$ with the subspace topology. Show that $E$ is connected.
There is the following hint: "Use (3.19.1) and (3.19.6) to study the structure of a subset of $E$ which is both open and closed."
(3.19.1) is the fact that the connected subspaces of $\mathbf{R}$ are intervals and that intervals are connected.
(3.19.6) is the fact that any open set of $\mathbf{R}$ is a countable disjoint union of open intervals.
My thoughts: Let $A$ be a clopen subset of $E$. It is fairly obvious that, for any $x\in\mathbf{R}$, $A$ contains either all elements or no element of $E_x$. So we define a subset $B$ of the real line by $B=\{x\in\mathbf{R}:E_x\subset A\}$. Now I thought that $B$ has to be clopen as well (in $\mathbf{R}$). But I can't prove it. I have no problems showing that any irrational point of $B$ is an interior point, and that any irrational point of $\overline{B}$ is in $B$, but nothing about rational points. I was pretty sure that this is the way to go, since the hint is exclusively about subsets of $\mathbf{R}$. 
Any (further) hint or comment is much appreciated.

REPLY [4 votes]: Consider the set $B$ as you have defined it. I claim that $B$ is an open subset of $\mathbb{R}$. If $x\in B$ and $x$ is irrational, then $(x,0)\in A$ and so $A$ contains a ball around $(x,0)$, and so $A$ contains points from $E_y$ for all $y$ sufficiently close to $x$. So $x$ is in the interior of $B$, as desired. If $x$ is rational, in contrast, then $A$ contains points from $E_y$ for all rational $y$ sufficiently close to $x$, and so $E_y\subset A$ for all rational $y$ sufficiently close to $x$. In this case, since the complement of $A$ is open, it means that the closure of such $E_y$ must be contained in $A$, but the closure of such $E_y$ includes all points of the form $(z,0)$ for irrational $z$ sufficiently close to $x$.  Thus again, $x$ is in the interior of $B$, as desired.
It now follows by considering the complement of $A$ that $B$ is also clopen, which would be a contradiction unless $A$ and hence $B$ was either empty or the whole space.
(I see now that Joriki has answered while I was writing this...)