The $\mathrm{OH}$ group of an alcohol or the$\mathrm{COOH}$ group of a carboxylic acid can be replaced by…
The $\mathrm{OH}$ group of an alcohol or the$\mathrm{COOH}$ group of a carboxylic acid can be replaced by $-\mathrm{Cl}$ using:
phosphorus pentachloride
hypochlorous acid
chlorine
hydrochloride acid
Solution
$\mathrm{PCl}_5$ on reaction with alcohol and carboxylic acid, replace $-\mathrm{OH}$ group with $-\mathrm{Cl}$.
$\begin{aligned}
\mathrm{ROH}+\mathrm{PCl}_5 \longrightarrow \mathrm{RCl} & +\mathrm{POCl}_3+\mathrm{HCl} \\
\mathrm{RCOOH}+\mathrm{PCl}_5 \longrightarrow & \mathrm{RCOCl}^2 \\
+ & \mathrm{POCl}_3+\mathrm{HCl}
\end{aligned}$
Related Theory
$\mathrm{PCl}_5$ is used as a chlorinating agent and dehydrating agent for the synthesis of pesticides, phosphite antioxidants, plasticizers and stabilizers for plastic and elastomers etc