I'm preparing for an exams and I've problems solving this exercise from an old exam, any help will be welcomed
Let $E\subset \mathbb{R}$ be a measurable set with $\mathfrak{L}^1(E)<\infty$ and $$P(E) = \sup\biggl\{\int_E\varphi'(x)\,dx:\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\biggr\}<\infty.$$
Prove that $E$ is (equivalent to, up to a set of measure $0$) the union of a finite number of bounded intervals.
In here $P(E)$ is just a formal way to define the perimeter, so the problem is proving that, if a subset of the real line $\mathbb{R}$ has finite length and finite perimeter then it is the union of a finite number on bounded intervals.
My problem is how to put together the two datas we have on $E$ (the finite perimeter and finite length).
I actually found a proof of this fact but it seems quite convoluted so I was hoping to find some help in understanding it or even better state it in a simpler way
This come from the book "Sets of finite perimeter and geometric variational problems" from Francesco Maggi
EDIT: My idea is to pass to the closure and then argue with connected components of the former, also using the fact that for balls $P(E)=H^{n-1}(E)$ the $(n-1)$-dimensional Hausdorff measure, this ball will need to be bounded and each of them giving a finite contribution to the perimeter therefore in a finite number. However to do so I need $\overline{E}\setminus E$ to have measure 0 and even if I'm quite sure about this in the comments of this own post it doesn't seem like so.

I am going to prove, by reductio ad absurdum (contradiction), that the sought for result is basically a consequence of the Archimedean property of real numbers: despite being relatively short, it is a "pseudo-elementary" proof since it involves the use of Vitali's Covering Lemma in the form given by Gordon ([2], chapter 4, pp. 52-54).
New edit: after the comment by @Del I realized that the first step in equation \eqref{2}, should be fully justified: that step is implied by the following relation $$ E\cap\bigcup^\infty_{k=1} I_k\underset{{\mu_\mathfrak{L}}}{\simeq}\,\bigcup^\infty_{k=1} I_k\iff \mu_\mathfrak{L}\left(E\cap\bigcup^\infty_{k=1} I_k\right) = \mu_\mathfrak{L}\left(\bigcup^\infty_{k=1} I_k\right) \label{3}\tag{N} $$ and a full justification of \eqref{3}, using the definition of Lebesgue's outer measure and Caratheodory's criterion for measurability of a set is given in the appendix section.
Notation.
The perimeter of an interval. Let $I=[a,b]\subset \mathbb{R}$ with $-\infty<a\leq b<+\infty$ be a finite interval: then $$ \begin{split} P(I) & = \sup\Biggl\{\int\limits_I\varphi'(x)\,\mathrm{d}x:\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\Biggr\}\\ &=\sup\biggl\{\varphi(b)-\varphi(a):\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\biggr\}= \begin{cases} 0 &\text{if }a=b\\ 2 &\text{if }a\neq b \end{cases}. \end{split}\label{1}\tag{1} $$ Thus the perimeter of an interval is always $2$ unless its Lebesgue measure is zero.
The structure of sets of finite perimeter on the real line. Let's introduce the deeper tool used in this answer: a strong form of Vitali's Covering lemma which holds true for any subset of the real line and involves only the analysis of its outer measure.
Definition (Gordon [2], p. 5). Let $E\subseteq\mathbb{R}$. A collection (family) $\mathscr{I}$ of intervals is a Vitali covering of $E$ if for each $x\in E$ and $\epsilon>0$ there exists an interval $I\in\mathscr{I}$ such that $x\in I$ and $\mu_\mathfrak{L}(I)<\epsilon$.
Vitali's Covering Lemma (Gordon ([2], chapter 4, lemma 4.5, pp. 52-54). Let $E\subseteq\mathbb{R}$ with $\mu_\mathfrak{L}^\ast(E)<\infty$. If $\mathscr{I}$ is a Vitali covering of $E$, then for each $\epsilon >0$ there exists a finite collection $\{I_k\}_{k\in (n)}=\{I_k: 1\le k\le n\}$ of disjoint intervals in $\mathscr{I}$ such that $$ \mu_\mathfrak{L}^\ast\left(E\setminus\bigcup^n_{k=1} I_k\right)<\epsilon. $$ In addition, there exists a sequence $\{I_k\}_{k\in \Bbb N}$ of disjoint intervals in $\mathscr{I}$ such that $$ \mu_\mathfrak{L}^\ast\left(E\setminus\bigcup^\infty_{k=1} I_k\right)=0. $$ Now, considering the additivity of the integral as a set function, \eqref{1} and a sequence $\{I_k\}_{k\in \Bbb N}$ which satisfies the Covering lemma, we have: $$ \begin{split} P(E) &= \sup\Biggl\{\,\int\limits_E\varphi'(x)\,\mathrm{d}x:\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\Biggr\}\\ & = \sup\Biggl\{\:\int\limits_{\bigcup^\infty_{k=1} I_k}\!\!\!\varphi'(x)\,\mathrm{d}x \;\;\,+\!\!\!\! \int\limits_{E\setminus\bigcup^\infty_{k=1} I_k}\!\!\!\!\!\!\!\varphi'(x)\,\mathrm{d}x:\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\Biggr\}\\ & = \sup\Biggl\{\:\int\limits_{\bigcup^\infty_{k=1} I_k}\!\!\!\varphi'(x)\,\mathrm{d}x :\varphi \in C_c^1(\mathbb{R})\wedge |\varphi|_{\infty}\le 1\Biggr\}\\ &= \sum_{k=1}^\infty P(I_k)= 2 \sum_{k=1}^\infty \delta({I_k}) \end{split}\label{2}\tag{2} $$ where the set function $\delta(A)$ is defined as follows $$ \delta_{A}= \begin{cases} 0 &\text{if }A=\emptyset\\ 1 &\text{if }A\neq\emptyset \end{cases} $$ Now, from \eqref{2} we immediately see that $I_k$ must be empty for $k$ larger than some $k>n\in\Bbb N$ for if otherwise the perimeter of $E$ cannot be finite: thus $E$ is (equivalent to, up to a set of measure $0$) to the union of a finite number of bounded intervals.
Appendix: proof of the relation \eqref{3}.
Let's recall the definition of outer measure of a set: $$ \mu^\ast(E)=\inf_{\mathscr{C}=\mathcal{C}(E)}\mu^\ast\left(\bigcup_{I_k\in \mathscr{C}}I_k\right) $$ where $\mathcal{C}$ is the set of all covering of $E$ made of intervals. Thus, by elementary considerations from real analysis, for all $\varepsilon>0$ there exist a covering $\mathscr{I}$ of $E$ such that $$ \mu^\ast\left(\bigcup_{I_k\in \mathscr{I}}I_k\right) < \mu^\ast(E)+\varepsilon\label{4}\tag{A1} $$ Now, $\mathscr{I}$ can be extended to a Vitali covering by simply adding to it the family of intervals $\{[-2^{-n}+x_o,2^{-n}+x_o]\cap I_k\}_{n\in\Bbb N}$ for all $x_o\in E$, where $I_k$ can be any interval containing $x_o$ chosen from the covering $\mathscr{I}$. Therefore we can apply Vitali's covering lemma to the family $\mathscr{I}$ in \eqref{4} and obtain a sequence of disjoint intervals intervals $\{I_k\}_{k\in\Bbb N}\subseteq\mathscr{I}$ such that $$ \mu^\ast\left(\bigcup_{k=1}^\infty I_k\right)\le \mu^\ast\left(\bigcup_{I_k\in \mathscr{I}}I_k\right) \le \mu^\ast(E)+\varepsilon\iff \mu^\ast\left(\bigcup_{k=1}^\infty I_k\right)\le \mu^\ast(E) \label{5}\tag{A2} $$ Now, since $$ E\setminus\bigcup^\infty_{k=1} I_k = E\cup\left(\bigcup^\infty_{k=1} I_k\!\right)^{\!\!c}, $$ we can apply \eqref{5} and Caratheodory's condition (since $E$ is measurable) and get $$ \begin{split} \mu^\ast\left(\bigcup_{k=1}^\infty I_k\right)&\le \mu^\ast(E) \\ & = \mu^\ast\left(E\cap\bigcup_{k=1}^\infty I_k\right)+\mu^\ast\left(E\cup\left(\bigcup^\infty_{k=1} I_k\!\right)^{\!\!c}\right)\\ & = \mu^\ast\left(E\cap\bigcup_{k=1}^\infty I_k\right)+\mu^\ast\left(E\setminus\bigcup^\infty_{k=1} I_k\right)\\ &= \mu^\ast\left(E\cap\bigcup_{k=1}^\infty I_k\right). \end{split} $$ But since $E\cap\bigcup_{k=1}^\infty I_k\subseteq \bigcup_{k=1}^\infty I_k$, then $$ \mu^\ast\left(E\cap\bigcup_{k=1}^\infty I_k\right) \le \mu^\ast\left(\bigcup_{k=1}^\infty I_k\right) \iff \mu^\ast\left(E\cap\bigcup_{k=1}^\infty I_k\right) =\mu^\ast\left(\bigcup_{k=1}^\infty I_k\right)\blacksquare $$ Final notes
References
[1] Ambrosio, Luigi and Fusco, Nicola and Pallara, Diego (2000), Functions of bounded variation and free discontinuity problems. Oxford Mathematical Monographs. New York and Oxford: The Clarendon Press/Oxford University Press, New York, pp. xviii+434, ISBN 0-19-850245-1, MR1857292, Zbl 0957.49001.
[2] Gordon, Russell A., The integrals of Lebesgue, Denjoy, Perron, and Henstock, Graduate Studies in Mathematics. 4. Providence, RI: American Mathematical Society (AMS). xi, 395 p. (1994), ISBN: 0-8218-3805-9, MR1288751, Zbl 0807.26004.
[3] Kannan, Rangachary and Krueger, Carole King, Advanced analysis on the real line, Universitext. New York, NY: Springer. ix, 259 p. (1996), ISBN: 0-387-94642-X, MR1390758, Zbl 0855.26001.
[4] Saks, Stanisław, Theory of the integral, 2nd, revised ed. Engl. translat. by L. C. Young. With two additional notes by Stefan Banach. (English), Monografie Matematyczne Tom. 7. New York: G. E. Stechert & Co. pp. vi+347 (1937), JFM 63.0183.05, MR0167578 (review of the Dover ed.), Zbl 0017.30004.